diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2009-07-31 23:09:58 +0000 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2009-07-31 23:09:58 +0000 |
commit | 930bb629e38db6ec060656ad5cc6e5ea193c344c (patch) | |
tree | c0812d46a1c06c84f1d361220b9bc0893bdb17cb /target/linux/s3c24xx/files-2.6.30/arch | |
parent | c5edf511cffd2fe07a74c5a3cc9f5d660f5deb50 (diff) | |
download | mtk-20170518-930bb629e38db6ec060656ad5cc6e5ea193c344c.zip mtk-20170518-930bb629e38db6ec060656ad5cc6e5ea193c344c.tar.gz mtk-20170518-930bb629e38db6ec060656ad5cc6e5ea193c344c.tar.bz2 |
Replace gta02 keyboard driver with generic gpio keyboard.
SVN-Revision: 17070
Diffstat (limited to 'target/linux/s3c24xx/files-2.6.30/arch')
-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 b5a9fa62..b74c94e 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] = { |