diff options
author | lars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-07-31 23:09:58 +0000 |
---|---|---|
committer | lars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-07-31 23:09:58 +0000 |
commit | cd38e695286156d85a17efd173e1808b042436e0 (patch) | |
tree | d9f728b9624377244705fac447dc42077e08287c /target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442 | |
parent | 2e4bbac449c087531d0d7a22228c89f86be4ea18 (diff) |
[s3c24xx] Replace gta02 keyboard driver with generic gpio keyboard.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17070 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442')
-rw-r--r-- | target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c index b5a9fa6218..b74c94eea3 100644 --- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c +++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c @@ -39,6 +39,7 @@ #include <linux/spi/spi_bitbang.h> #include <linux/mmc/host.h> #include <linux/leds.h> +#include <linux/gpio_keys.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> @@ -1273,40 +1274,38 @@ struct platform_device gta02_led_dev = { }, }; -static struct resource gta02_button_resources[] = { - [0] = { - .start = GTA02_GPIO_AUX_KEY, - .end = GTA02_GPIO_AUX_KEY, - }, - [1] = { - .start = GTA02_GPIO_HOLD_KEY, - .end = GTA02_GPIO_HOLD_KEY, - }, - [2] = { - .start = GTA02_GPIO_JACK_INSERT, - .end = GTA02_GPIO_JACK_INSERT, - }, - [3] = { - .start = 0, - .end = 0, +static struct gpio_keys_button gta02_buttons[] = { + { + .gpio = GTA02_GPIO_AUX_KEY, + .code = KEY_PHONE, + .desc = "Aux", + .type = EV_KEY, }, - [4] = { - .start = 0, - .end = 0, + { + .gpio = GTA02_GPIO_HOLD_KEY, + .code = KEY_PAUSE, + .desc = "Hold", + .type = EV_KEY, }, }; +static struct gpio_keys_platform_data gta02_buttons_pdata = { + .buttons = gta02_buttons, + .nbuttons = ARRAY_SIZE(gta02_buttons), +}; + static struct platform_device gta02_button_dev = { - .name = "gta02-button", - .num_resources = ARRAY_SIZE(gta02_button_resources), - .resource = gta02_button_resources, + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = >a02_buttons_pdata, + }, }; static struct platform_device gta02_pm_usbhost_dev = { .name = "gta02-pm-host", }; - /* USB */ static struct s3c2410_hcd_info gta02_usb_info = { .port[0] = { |