Changeset 44692


Ignore:
Timestamp:
2015-03-12T11:06:42+01:00 (3 years ago)
Author:
blogic
Message:

ar71xx: Hornet UB GPIO WPS/Reset

This problem has existed at least since Attitude Adjustment and
is also present in trunk. Basically on the Hornet-UB board the
functionality of RESET and WPS have "switched places".

There are two tickets about the issue at dev.openwrt.org,
The solution suggested on them both is incomplete though
and introduces the following proglem:

Patching as suggested on #14136/#15282 will result in a situation
where simply pressing the RESET button on the bottom will cause
FACTORY RESET to be run. This is due to GPIO high/low state being
incorrect as a result of the above change and virtually the RESET
button is in the pressed-down state the entire time. When it is
then physically pressed, that causes the opposite, release, to be
triggered and since to the board it seemed that the button was
pressed long before it was released, the FACTORY RESET results.

The attached patch works as expected. I have verified both the
incorrect functionality as well as after fixing the issue as
described in the patch and flashing the resulting firmware to a
Hornet-UB board.

Signed-off-by: Janne Cederberg <janne.cederberg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c

    r41643 r44692  
    2929#define HORNET_UB_GPIO_LED_WPS          27 
    3030 
    31 #define HORNET_UB_GPIO_BTN_RESET        11 
    32 #define HORNET_UB_GPIO_BTN_WPS          12 
     31#define HORNET_UB_GPIO_BTN_RESET        12 
     32#define HORNET_UB_GPIO_BTN_WPS          11 
    3333 
    3434#define HORNET_UB_GPIO_USB_POWER        26 
     
    6565                .name           = "alfa:blue:wps", 
    6666                .gpio           = HORNET_UB_GPIO_LED_WPS, 
    67                 .active_low     = 1, 
     67                .active_low     = 0, 
    6868        }, 
    6969}; 
     
    7676                .debounce_interval = HORNET_UB_KEYS_DEBOUNCE_INTERVAL, 
    7777                .gpio           = HORNET_UB_GPIO_BTN_WPS, 
    78                 .active_low     = 1, 
     78                .active_low     = 0, 
    7979        }, 
    8080        { 
     
    8484                .debounce_interval = HORNET_UB_KEYS_DEBOUNCE_INTERVAL, 
    8585                .gpio           = HORNET_UB_GPIO_BTN_RESET, 
    86                 .active_low     = 0, 
     86                .active_low     = 1, 
    8787        } 
    8888}; 
Note: See TracChangeset for help on using the changeset viewer.