|
@@ -348,3 +348,27 @@ static inline void __init overo_init_led(void) { return; }
|
|
|
|
|
|
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
|
|
#include <linux/input.h>
|
|
|
+#include <linux/gpio_keys.h>
|
|
|
+
|
|
|
+static struct gpio_keys_button gpio_buttons[] = {
|
|
|
+ {
|
|
|
+ .code = BTN_0,
|
|
|
+ .gpio = 23,
|
|
|
+ .desc = "button0",
|
|
|
+ .wakeup = 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .code = BTN_1,
|
|
|
+ .gpio = 14,
|
|
|
+ .desc = "button1",
|
|
|
+ .wakeup = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data gpio_keys_pdata = {
|
|
|
+ .buttons = gpio_buttons,
|
|
|
+ .nbuttons = ARRAY_SIZE(gpio_buttons),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device gpio_keys_device = {
|
|
|
+ .name = "gpio-keys",
|