switch to gpio-keys-polled
authorFlorian Fainelli <florian@openwrt.org>
Fri, 27 Apr 2012 16:44:48 +0000 (16:44 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 27 Apr 2012 16:44:48 +0000 (16:44 +0000)
SVN-Revision: 31491

16 files changed:
target/linux/brcm63xx/Makefile
target/linux/brcm63xx/patches-3.3/300-reset_buttons.patch
target/linux/brcm63xx/patches-3.3/302-extended-platform-devices.patch
target/linux/brcm63xx/patches-3.3/500-board-D4PW.patch
target/linux/brcm63xx/patches-3.3/501-board-NB4.patch
target/linux/brcm63xx/patches-3.3/503-board-CPVA642.patch
target/linux/brcm63xx/patches-3.3/504-board_dsl_274xb_rev_c.patch
target/linux/brcm63xx/patches-3.3/505-board_spw500v.patch
target/linux/brcm63xx/patches-3.3/506-board_gw6200_gw6000.patch
target/linux/brcm63xx/patches-3.3/510-board_spw303v.patch
target/linux/brcm63xx/patches-3.3/511-board_V2500V.patch
target/linux/brcm63xx/patches-3.3/512-board_BTV2110.patch
target/linux/brcm63xx/patches-3.3/514-board_ct536_ct5621.patch
target/linux/brcm63xx/patches-3.3/516-board_96348A-122.patch
target/linux/brcm63xx/patches-3.3/550-alice_gate2_leds.patch
target/linux/brcm63xx/patches-3.3/552-board_96348gw-10_reset_button.patch

index 525903c0e55e3620265c8b54aefd39981c534d9a..5f64ee7c02948e4d8ede8bd916b6f78d0166b783 100644 (file)
@@ -15,7 +15,7 @@ MAINTAINER:=Florian Fainelli <florian@openwrt.org>
 
 include $(INCLUDE_DIR)/target.mk
 
-DEFAULT_PACKAGES += kmod-switch kmod-input-gpio-buttons \
+DEFAULT_PACKAGES += kmod-switch kmod-input-gpio-keys-polled \
        kmod-button-hotplug
 
 define Target/Description
index ef57ff8bfa45319bfd06a15b2a6688aa3127e800..9420b8bc0cb6ae9a1befa7d780394febed514fd2 100644 (file)
@@ -4,7 +4,7 @@
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/physmap.h>
  #include <linux/ssb/ssb.h>
-+#include <linux/gpio_buttons.h>
++#include <linux/gpio_keys.h>
 +#include <linux/input.h>
  #include <asm/addrspace.h>
  #include <bcm63xx_board.h>
@@ -20,7 +20,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
  };
@@ -37,7 +37,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
  };
        .dev.platform_data      = &bcm63xx_led_data,
  };
  
-+static struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
++static struct gpio_keys_platform_data bcm63xx_gpio_keys_data = {
 +      .poll_interval  = 20,
 +};
 +
-+static struct platform_device bcm63xx_gpio_buttons_device = {
-+      .name           = "gpio-buttons",
++static struct platform_device bcm63xx_gpio_keys_device = {
++      .name           = "gpio-keys-polled",
 +      .id             = 0,
-+      .dev.platform_data = &bcm63xx_gpio_buttons_data,
++      .dev.platform_data = &bcm63xx_gpio_keys_data,
 +};
 +
  /*
 +              button_count++;
 +
 +      if (button_count) {
-+              bcm63xx_gpio_buttons_data.nbuttons = button_count;
-+              bcm63xx_gpio_buttons_data.buttons = board.buttons;
++              bcm63xx_gpio_keys_data.nbuttons = button_count;
++              bcm63xx_gpio_keys_data.buttons = board.buttons;
 +
-+              platform_device_register(&bcm63xx_gpio_buttons_device);
++              platform_device_register(&bcm63xx_gpio_keys_device);
 +      }
 +
        return 0;
@@ -90,7 +90,7 @@
  
  #include <linux/types.h>
  #include <linux/gpio.h>
-+#include <linux/gpio_buttons.h>
++#include <linux/gpio_keys.h>
  #include <linux/leds.h>
  #include <bcm63xx_dev_enet.h>
  #include <bcm63xx_dev_dsp.h>
        struct gpio_led leds[5];
 +
 +      /* Buttons */
-+      struct gpio_button buttons[4];
++      struct gpio_keys_button buttons[4];
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
index 8e0ecafe39470fe6f947b38b9e5918a2aa3ea05b..9d9d6ce4b7a7d6af59104cc6e25cfc0aabc30472 100644 (file)
@@ -15,7 +15,7 @@
 @@ -61,6 +61,10 @@ struct board_info {
  
        /* Buttons */
-       struct gpio_button buttons[4];
+       struct gpio_keys_button buttons[4];
 +
 +      /* Additional platform devices */
 +      struct platform_device **devs;
index aa92bbc50ca3db57b946a80d6d2ede1abb0a6a00..5a769dc7cc74f54e0a87511e00e41690297c3408 100644 (file)
@@ -48,7 +48,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index d70d00bcf1a0760e31c689ccd8b7bb82fb53609e..e1e85ba838ffe6da09fa49ed2e766701bd538455 100644 (file)
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +      .devs = nb4_devices,
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +      .devs = nb4_devices,
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +      .devs = nb4_devices,
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +      .devs = nb4_devices,
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +      .devs = nb4_devices,
index 28bd9b1a7f5c4d3c55ee76be8628830e91f791f6..d969e221232b250f1147d64435d7ade258bbe3d1 100644 (file)
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 37,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 43818a29e0fffea090d8900c6d82d4bd0bd89122..375c8243646f81c7d71e825529ecc300cf01bf16 100644 (file)
@@ -52,7 +52,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 89adf93b620b06f506717d7442f49e95735020f7..fff5d68be2a4a310343675cb48a74716e5452519 100644 (file)
@@ -60,7 +60,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 05c2d5eb2e1e5cdbc873347c2f1393b5da444516..a82f2b0556c05a7b772563917d6ad78898557178 100644 (file)
@@ -61,7 +61,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 7b7e7e064924e78ee3c8ecd756f61d4e164da62f..2002ab4f4bbc3d8285d326fa06d349747e078a79 100644 (file)
@@ -58,7 +58,7 @@
 +                      .gpio           = 11,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "ses",
@@ -66,7 +66,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      }
 +};
index bc9ea8b17bae61ff6dfebd8bc14b532153f6a418..e90e6cc21c9bd172c31b5820660ec47bdcc19565 100644 (file)
@@ -56,7 +56,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 7469243070f138b22cae979ff9cdc73deb620b97..07d7049e09ffe54b85f691c8a8fa9f74c37b1a20 100644 (file)
@@ -54,7 +54,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 1418020b1edc159a768738399416c420d01dc8f5..f682fe5f600d4b9fce2d5747c11b047836a4797b 100644 (file)
@@ -42,7 +42,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 28a2b4b47b83a111787ac217c6e5c105b4dc19f2..67292302210579a33f682626ecd075271afe2c1d 100644 (file)
@@ -44,7 +44,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wifi",
@@ -52,7 +52,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = BTN_0,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
@@ -60,7 +60,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
 +};
index 82d0385f94ef0de77b7ed35baaed795c8ad7ca01..b6bf40f636d45b858f68d21476698deb61ceb36b 100644 (file)
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +              {
 +                      .desc           = "wps",
 +                      .gpio           = 34,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
  };
index dcd65bae88498ac138ef4af8d84a20d2ec21504c..eeaad031437f3e93e8b28a58714ead289b26a94d 100644 (file)
@@ -12,7 +12,7 @@
 +                      .active_low     = 1,
 +                      .type           = EV_KEY,
 +                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
++                      .debounce_interval = 60,
 +              },
 +      },
  };