aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/tosa.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 9b26fa5edad6..f99112d50b41 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -21,6 +21,8 @@
21#include <linux/mmc/host.h> 21#include <linux/mmc/host.h>
22#include <linux/pm.h> 22#include <linux/pm.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/gpio_keys.h>
25#include <linux/input.h>
24 26
25#include <asm/setup.h> 27#include <asm/setup.h>
26#include <asm/memory.h> 28#include <asm/memory.h>
@@ -246,6 +248,46 @@ static struct platform_device tosakbd_device = {
246 .id = -1, 248 .id = -1,
247}; 249};
248 250
251static struct gpio_keys_button tosa_gpio_keys[] = {
252 {
253 .type = EV_PWR,
254 .code = KEY_SUSPEND,
255 .gpio = TOSA_GPIO_ON_KEY,
256 .desc = "On key",
257 .wakeup = 1,
258 .active_low = 1,
259 },
260 {
261 .type = EV_KEY,
262 .code = TOSA_KEY_RECORD,
263 .gpio = TOSA_GPIO_RECORD_BTN,
264 .desc = "Record Button",
265 .wakeup = 1,
266 .active_low = 1,
267 },
268 {
269 .type = EV_KEY,
270 .code = TOSA_KEY_SYNC,
271 .gpio = TOSA_GPIO_SYNC,
272 .desc = "Sync Button",
273 .wakeup = 1,
274 .active_low = 1,
275 },
276};
277
278static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
279 .buttons = tosa_gpio_keys,
280 .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
281};
282
283static struct platform_device tosa_gpio_keys_device = {
284 .name = "gpio-keys",
285 .id = -1,
286 .dev = {
287 .platform_data = &tosa_gpio_keys_platform_data,
288 },
289};
290
249/* 291/*
250 * Tosa LEDs 292 * Tosa LEDs
251 */ 293 */
@@ -258,6 +300,7 @@ static struct platform_device *devices[] __initdata = {
258 &tosascoop_device, 300 &tosascoop_device,
259 &tosascoop_jc_device, 301 &tosascoop_jc_device,
260 &tosakbd_device, 302 &tosakbd_device,
303 &tosa_gpio_keys_device,
261 &tosaled_device, 304 &tosaled_device,
262}; 305};
263 306