X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fsh%2Fboards%2Fmach-rsk%2Fdevices-rsk7203.c;h=a8089f79d0580d5d0725e07c9193e1fa7c8d996c;hb=e3166331a3288dd7184548896a1c7ab682f0dbe8;hp=4fa08ba10253b40b0088e280a6f60ee6d22cee78;hpb=772320e84588dcbe1600ffb83e5f328f2209ac2a;p=pandora-kernel.git diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c index 4fa08ba10253..a8089f79d058 100644 --- a/arch/sh/boards/mach-rsk/devices-rsk7203.c +++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c @@ -1,7 +1,7 @@ /* * Renesas Technology Europe RSK+ 7203 Support. * - * Copyright (C) 2008 Paul Mundt + * Copyright (C) 2008 - 2010 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -12,7 +12,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -84,9 +86,42 @@ static struct platform_device led_device = { }, }; +static struct gpio_keys_button rsk7203_gpio_keys_table[] = { + { + .code = BTN_0, + .gpio = GPIO_PB0, + .active_low = 1, + .desc = "SW1", + }, { + .code = BTN_1, + .gpio = GPIO_PB1, + .active_low = 1, + .desc = "SW2", + }, { + .code = BTN_2, + .gpio = GPIO_PB2, + .active_low = 1, + .desc = "SW3", + }, +}; + +static struct gpio_keys_platform_data rsk7203_gpio_keys_info = { + .buttons = rsk7203_gpio_keys_table, + .nbuttons = ARRAY_SIZE(rsk7203_gpio_keys_table), + .poll_interval = 50, /* default to 50ms */ +}; + +static struct platform_device keys_device = { + .name = "gpio-keys-polled", + .dev = { + .platform_data = &rsk7203_gpio_keys_info, + }, +}; + static struct platform_device *rsk7203_devices[] __initdata = { &smsc911x_device, &led_device, + &keys_device, }; static int __init rsk7203_devices_setup(void)