aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2010-08-02 06:18:01 -0400
committerTony Lindgren <tony@atomide.com>2010-08-02 06:18:01 -0400
commitad74db60418fcb5946529816b54b6f3ceeff3d6d (patch)
tree1f9874c951edd1924e600572106386499ba21de3 /arch/arm/mach-omap2
parentc3777c19d26cbd5a3e48c63602ac1a527c3175db (diff)
omap3: pandora: update gpio-keys data
Update gpio-keys setup so it matches what is on default firmware. Also make use of debounce feature in gpio-keys instead of setting it explicitly, as gpio-keys is now capable of using hardware debounce on OMAPs thanks to recent gpiolib changes. Also fix a sparce warning along the way. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index db06dc910ba7..7a127291b7da 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -48,9 +48,6 @@
48 48
49#define OMAP3_PANDORA_TS_GPIO 94 49#define OMAP3_PANDORA_TS_GPIO 94
50 50
51/* hardware debounce: (value + 1) * 31us */
52#define GPIO_DEBOUNCE_TIME 127
53
54static struct gpio_led pandora_gpio_leds[] = { 51static struct gpio_led pandora_gpio_leds[] = {
55 { 52 {
56 .name = "pandora::sd1", 53 .name = "pandora::sd1",
@@ -88,6 +85,7 @@ static struct platform_device pandora_leds_gpio = {
88 .type = ev_type, \ 85 .type = ev_type, \
89 .code = ev_code, \ 86 .code = ev_code, \
90 .active_low = act_low, \ 87 .active_low = act_low, \
88 .debounce_interval = 4, \
91 .desc = "btn " descr, \ 89 .desc = "btn " descr, \
92} 90}
93 91
@@ -99,14 +97,14 @@ static struct gpio_keys_button pandora_gpio_keys[] = {
99 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"), 97 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"),
100 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"), 98 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"),
101 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"), 99 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"),
102 GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"), 100 GPIO_BUTTON_LOW(109, KEY_PAGEUP, "game 1"),
103 GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"), 101 GPIO_BUTTON_LOW(111, KEY_END, "game 2"),
104 GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"), 102 GPIO_BUTTON_LOW(106, KEY_PAGEDOWN, "game 3"),
105 GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"), 103 GPIO_BUTTON_LOW(101, KEY_HOME, "game 4"),
106 GPIO_BUTTON_LOW(102, BTN_TL, "l"), 104 GPIO_BUTTON_LOW(102, KEY_RIGHTSHIFT, "l"),
107 GPIO_BUTTON_LOW(97, BTN_TL2, "l2"), 105 GPIO_BUTTON_LOW(97, KEY_KPPLUS, "l2"),
108 GPIO_BUTTON_LOW(105, BTN_TR, "r"), 106 GPIO_BUTTON_LOW(105, KEY_RIGHTCTRL, "r"),
109 GPIO_BUTTON_LOW(107, BTN_TR2, "r2"), 107 GPIO_BUTTON_LOW(107, KEY_KPMINUS, "r2"),
110 GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"), 108 GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"),
111 GPIO_BUTTON_LOW(99, KEY_MENU, "menu"), 109 GPIO_BUTTON_LOW(99, KEY_MENU, "menu"),
112 GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"), 110 GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"),
@@ -127,14 +125,7 @@ static struct platform_device pandora_keys_gpio = {
127 }, 125 },
128}; 126};
129 127
130static void __init pandora_keys_gpio_init(void) 128static const uint32_t board_keymap[] = {
131{
132 /* set debounce time for GPIO banks 4 and 6 */
133 gpio_set_debounce(32 * 3, GPIO_DEBOUNCE_TIME);
134 gpio_set_debounce(32 * 5, GPIO_DEBOUNCE_TIME);
135}
136
137static int board_keymap[] = {
138 /* row, col, code */ 129 /* row, col, code */
139 KEY(0, 0, KEY_9), 130 KEY(0, 0, KEY_9),
140 KEY(0, 1, KEY_8), 131 KEY(0, 1, KEY_8),
@@ -582,7 +573,6 @@ static void __init omap3pandora_init(void)
582 ARRAY_SIZE(omap3pandora_spi_board_info)); 573 ARRAY_SIZE(omap3pandora_spi_board_info));
583 omap3pandora_ads7846_init(); 574 omap3pandora_ads7846_init();
584 usb_ehci_init(&ehci_pdata); 575 usb_ehci_init(&ehci_pdata);
585 pandora_keys_gpio_init();
586 usb_musb_init(&musb_board_data); 576 usb_musb_init(&musb_board_data);
587 577
588 /* Ensure SDRC pins are mux'd for self-refresh */ 578 /* Ensure SDRC pins are mux'd for self-refresh */