aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-07-19 13:20:37 +0000
committerJonas Gorski <jogo@openwrt.org>2013-07-19 13:20:37 +0000
commitadd3a26909cdbd77b33ea33ab2eca960c74cc587 (patch)
treea869d68ba8c7c157bda6aa5d83d7676efb08d46c /target/linux/ixp4xx
parent580b2a70a08172b2e70d1ff4cf2518c9faf761be (diff)
downloadmaster-187ad058-add3a26909cdbd77b33ea33ab2eca960c74cc587.tar.gz
master-187ad058-add3a26909cdbd77b33ea33ab2eca960c74cc587.tar.bz2
master-187ad058-add3a26909cdbd77b33ea33ab2eca960c74cc587.zip
ixp4xx: switch cambira to gpio_keys_polled
gpio_buttons have been deprecated since a long time. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37434 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx')
-rw-r--r--target/linux/ixp4xx/patches-3.10/190-cambria_support.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/target/linux/ixp4xx/patches-3.10/190-cambria_support.patch b/target/linux/ixp4xx/patches-3.10/190-cambria_support.patch
index a8604abff0..7698912cce 100644
--- a/target/linux/ixp4xx/patches-3.10/190-cambria_support.patch
+++ b/target/linux/ixp4xx/patches-3.10/190-cambria_support.patch
@@ -142,7 +142,7 @@
+ */
+
+#include <linux/device.h>
-+#include <linux/gpio_buttons.h>
++#include <linux/gpio_keys.h>
+#include <linux/gpio.h>
+#include <linux/i2c.h>
+#include <linux/i2c-gpio.h>
@@ -509,7 +509,7 @@
+ { 12, GPIOF_IN, "*GSC_IRQ#" },
+ { 13, GPIOF_OUT_INIT_HIGH, "*PCIE_RST#"},
+ // GSC GPIO
-+#if !(defined(CONFIG_INPUT_GPIO_BUTTONS) || defined(CONFIG_INPUT_GPIO_BUTTONS_MODULE))
++#if !(IS_ENABLED(CONFIG_KEYBOARD_GPIO_POLLED))
+ {100, GPIOF_IN, "*USER_PB#" },
+#endif
+ {103, GPIOF_OUT_INIT_HIGH, "*5V_EN" }, // 5V aux supply enable
@@ -540,7 +540,7 @@
+ { 12, GPIOF_IN, "*GSC_IRQ#" },
+ { 13, GPIOF_OUT_INIT_HIGH, "*PCIE_RST#"},
+ // GSC GPIO
-+#if !(defined(CONFIG_INPUT_GPIO_BUTTONS) || defined(CONFIG_INPUT_GPIO_BUTTONS_MODULE))
++#if !(IS_ENABLED(CONFIG_KEYBOARD_GPIO_POLLED))
+ {100, GPIOF_IN, "*USER_PB#" },
+#endif
+ {108, GPIOF_OUT_INIT_LOW, "*ENET1_EN#" }, // ENET1 TX Enable
@@ -667,24 +667,24 @@
+};
+
+
-+static struct gpio_button cambria_gpio_buttons[] = {
++static struct gpio_keys_button cambria_gpio_buttons[] = {
+ {
+ .desc = "user",
+ .type = EV_KEY,
+ .code = BTN_0,
-+ .threshold = 2,
++ .debounce_interval = 6,
+ .gpio = 25,
+ }
+};
+
-+static struct gpio_buttons_platform_data cambria_gpio_buttons_data = {
++static struct gpio_keys_platform_data cambria_gpio_buttons_data = {
+ .poll_interval = 500,
+ .nbuttons = 1,
+ .buttons = cambria_gpio_buttons,
+};
+
+static struct platform_device cambria_gpio_buttons_device = {
-+ .name = "gpio-buttons",
++ .name = "gpio-keys-polled",
+ .id = -1,
+ .dev.platform_data = &cambria_gpio_buttons_data,
+};
@@ -829,7 +829,7 @@
+ cambria_gpio_leds[2].gpio = 119; // PNLLED4#
+ platform_device_register(&cambria_gpio_leds_device);
+
-+#if (defined(CONFIG_INPUT_GPIO_BUTTONS) || defined(CONFIG_INPUT_GPIO_BUTTONS_MODULE))
++#if (IS_ENABLED(CONFIG_KEYBOARD_GPIO_POLLED))
+ cambria_gpio_buttons[0].gpio = 100;
+ platform_device_register(&cambria_gpio_buttons_device);
+#endif
@@ -934,7 +934,7 @@
+ cambria_gpio_leds[2].gpio = 119;
+ platform_device_register(&cambria_gpio_leds_device);
+
-+#if (defined(CONFIG_INPUT_GPIO_BUTTONS) || defined(CONFIG_INPUT_GPIO_BUTTONS_MODULE))
++#if (IS_ENABLED(CONFIG_KEYBOARD_GPIO_POLLED))
+ cambria_gpio_buttons[0].gpio = 100;
+ platform_device_register(&cambria_gpio_buttons_device);
+#endif