The patch titled spitz: add gpio button support has been added to the -mm tree. Its filename is spitz-add-gpio-button-support.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: spitz: add gpio button support From: Pavel Machek <pavel@xxxxxx> Spitz switched to generic matrix-gpio keyboard driver in 2.6.32-rc0, but that means that support for power button and lid switches was lost. This restores it, using button-gpio code. Signed-off-by: Pavel Machek <pavel@xxxxxx> Cc: Eric Miao <eric.y.miao@xxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx> Cc: "Rafael J. Wysocki" <rjw@xxxxxxx> Cc: Eric Miao <eric.y.miao@xxxxxxxxx> Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Cc: Stanislav Brabec <utx@xxxxxxxxxx> Cc: Cyril Hrubis <metan@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN arch/arm/mach-pxa/spitz.c~spitz-add-gpio-button-support arch/arm/mach-pxa/spitz.c --- a/arch/arm/mach-pxa/spitz.c~spitz-add-gpio-button-support +++ a/arch/arm/mach-pxa/spitz.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/delay.h> +#include <linux/gpio_keys.h> #include <linux/gpio.h> #include <linux/leds.h> #include <linux/mtd/physmap.h> @@ -375,6 +376,51 @@ static struct platform_device spitzkbd_d }; +static struct gpio_keys_button spitz_gpio_keys[] = { + { + .type = EV_KEY, + .code = KEY_SUSPEND, + .gpio = SPITZ_GPIO_ON_KEY, + .desc = "Power button", + .wakeup = 1, + }, + /* Two buttons detecting the LID state */ + { + .type = EV_SW, + .code = 0, + .gpio = SPITZ_GPIO_SWA, + .desc = "Lid SWA", + }, + { + .type = EV_SW, + .code = 1, + .gpio = SPITZ_GPIO_SWB, + .desc = "Lid SWB", + }, + /* This is for remote control support. Zaurus supports wired + remote on headphones. */ + { + .type = EV_SW, + .code = 2, + .gpio = SPITZ_GPIO_AK_INT, + .desc = "Wired remote (AK_INT)", + }, +}; + +static struct gpio_keys_platform_data spitz_gpio_keys_platform_data = { + .buttons = spitz_gpio_keys, + .nbuttons = ARRAY_SIZE(spitz_gpio_keys), +}; + +static struct platform_device spitz_gpio_keys_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &spitz_gpio_keys_platform_data, + }, +}; + + /* * Spitz LEDs */ @@ -689,6 +735,7 @@ static struct platform_device sharpsl_ro static struct platform_device *devices[] __initdata = { &spitzscoop_device, &spitzkbd_device, + &spitz_gpio_keys_device, &spitzled_device, &sharpsl_nand_device, &sharpsl_rom_device, _ Patches currently in -mm which might be from pavel@xxxxxx are linux-next.patch synaptics-touchscreen-for-htc-dream-check-that-smbus-is-available.patch spitz-add-gpio-button-support.patch lis3lv02d-axis-remap-and-resource-setup-release.patch lis3lv02d-i2c-support.patch fatfs-use-common-time_to_tm-in-fat_time_unix2fat.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html