Patchwork [2/3] efikasb: fix gpio keys.

login
register
mail settings
Submitter Arnaud Patard (Rtp)
Date June 27, 2011, 8:41 p.m.
Message ID <20110627204117.329413746@rtp-net.org>
Download mbox | patch
Permalink /patch/102281/
State New
Headers show

Comments

Arnaud Patard (Rtp) - June 27, 2011, 8:41 p.m.
While testing the keys, I only checked that the key were generating an input
event but unfortunately, they were not generating the right event. Fix that.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Patch

Index: linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikasb.c
===================================================================
--- linux-2.6-submit.orig/arch/arm/mach-mx5/board-mx51_efikasb.c	2011-06-20 20:36:11.000000000 +0200
+++ linux-2.6-submit/arch/arm/mach-mx5/board-mx51_efikasb.c	2011-06-22 00:23:26.000000000 +0200
@@ -201,23 +201,24 @@  static struct gpio_keys_button mx51_efik
 	{
 		.code = KEY_POWER,
 		.gpio = EFIKASB_PWRKEY,
-		.type = EV_PWR,
+		.type = EV_KEY,
 		.desc = "Power Button",
 		.wakeup = 1,
-		.debounce_interval = 10, /* ms */
+		.active_low = 1,
 	},
 	{
 		.code = SW_LID,
 		.gpio = EFIKASB_LID,
 		.type = EV_SW,
 		.desc = "Lid Switch",
+		.active_low = 1,
 	},
 	{
-		/* SW_RFKILLALL vs KEY_RFKILL ? */
-		.code = SW_RFKILL_ALL,
+		.code = KEY_RFKILL,
 		.gpio = EFIKASB_RFKILL,
-		.type = EV_SW,
+		.type = EV_KEY,
 		.desc = "rfkill",
+		.active_low = 1,
 	},
 };