ar71xx: TL-MR3020: fix GPIO polarity for button and switch
authorGabor Juhos <juhosg@openwrt.org>
Wed, 25 Jan 2012 07:44:43 +0000 (07:44 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 25 Jan 2012 07:44:43 +0000 (07:44 +0000)
This patch fixes the GPIO polarity for the button and the sliding
switch. The buttons are not active low. "Pressed" and "Released"
events are wrong without the patch.

Signed-off-by: Christian Cier-Zniewski <c.cier@gmx.de>
SVN-Revision: 29904

target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-tl-mr3020.c
target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-tl-mr3020.c

index 6af58d1a5f593a6134548f84255c397e414587d9..21ec3e0f770b8c5ba4ce5a909bf0f99312da807f 100644 (file)
@@ -74,7 +74,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = KEY_WPS_BUTTON,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_WPS,
-               .active_low     = 1,
+               .active_low     = 0,
        },
        {
                .desc           = "sw1",
@@ -82,7 +82,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = BTN_0,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_SW1,
-               .active_low     = 1,
+               .active_low     = 0,
        },
        {
                .desc           = "sw2",
@@ -90,7 +90,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = BTN_1,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_SW2,
-               .active_low     = 1,
+               .active_low     = 0,
        }
 };
 
index f31874ff67076f08fb5f961ff657b69b04a1ddd1..35be0f7ad4b232fcf8363f51e59796285b79b23e 100644 (file)
@@ -74,7 +74,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = KEY_WPS_BUTTON,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_WPS,
-               .active_low     = 1,
+               .active_low     = 0,
        },
        {
                .desc           = "sw1",
@@ -82,7 +82,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = BTN_0,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_SW1,
-               .active_low     = 1,
+               .active_low     = 0,
        },
        {
                .desc           = "sw2",
@@ -90,7 +90,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
                .code           = BTN_1,
                .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = TL_MR3020_GPIO_BTN_SW2,
-               .active_low     = 1,
+               .active_low     = 0,
        }
 };