summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9m10g45ek
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-01-13 11:54:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-13 16:28:08 +0100
commit30b7c5ead35f8570cbd96d4344755a72a8f3307c (patch)
tree942d86cf6dbdf036c45a2329d10d3d4ffe3d99f5 /arch/arm/boards/at91sam9m10g45ek
parentdcaf3adb5383acb4e17b02054602d2c14c0a80a5 (diff)
downloadbarebox-30b7c5ead35f8570cbd96d4344755a72a8f3307c.tar.gz
barebox-30b7c5ead35f8570cbd96d4344755a72a8f3307c.tar.xz
input: gpio-keys: Use KEY_* keycodes
The gpio-keys driver takes ascii key codes from platform_data and Linux keycodes from device tree. Convert the ascii keys over to Linux keycodes to get rid of the special cases in the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/at91sam9m10g45ek')
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/init.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index e00908bc39..fb444d820d 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -40,6 +40,7 @@
#include <gpio_keys.h>
#include <readkey.h>
#include <spi/spi.h>
+#include <input/input.h>
/*
* board revision encoding
@@ -183,25 +184,25 @@ static void ek_device_add_leds(void) {}
#ifdef CONFIG_KEYBOARD_GPIO
struct gpio_keys_button keys[] = {
{
- .code = BB_KEY_HOME,
+ .code = KEY_HOME,
.gpio = AT91_PIN_PB6,
}, {
- .code = BB_KEY_RETURN,
+ .code = KEY_ENTER,
.gpio = AT91_PIN_PB7,
}, {
- .code = BB_KEY_LEFT,
+ .code = KEY_LEFT,
.gpio = AT91_PIN_PB14,
}, {
- .code = BB_KEY_RIGHT,
+ .code = KEY_RIGHT,
.gpio = AT91_PIN_PB15,
}, {
- .code = BB_KEY_UP,
+ .code = KEY_UP,
.gpio = AT91_PIN_PB16,
}, {
- .code = BB_KEY_DOWN,
+ .code = KEY_DOWN,
.gpio = AT91_PIN_PB17,
}, {
- .code = BB_KEY_RETURN,
+ .code = KEY_ENTER,
.gpio = AT91_PIN_PB18,
},
};