From 6f250fa224375b4fa858fda890b7cd0136173b7c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 20 Nov 2013 19:04:50 +0100 Subject: colibri_t20/colibri_t30: don't register KEY_BACK for wakeup The port used for KEY_BACK does not support wakeup (no wake PIN). Remove the wake flag, this prevents unbalanced irq warning messages. --- arch/arm/mach-tegra/board-colibri_t20.c | 16 +++++++++------- arch/arm/mach-tegra/board-colibri_t30.c | 13 ++++++++----- drivers/input/keyboard/gpio_keys.c | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-tegra/board-colibri_t20.c b/arch/arm/mach-tegra/board-colibri_t20.c index 299ba2d5c345..f7153ab6a50b 100644 --- a/arch/arm/mach-tegra/board-colibri_t20.c +++ b/arch/arm/mach-tegra/board-colibri_t20.c @@ -554,12 +554,14 @@ static void colibri_t20_i2c_init(void) } /* Keys - Note: active-low means pull-ups required on carrier board resp. via - pin-muxing - Note2: power-key active-high due to EvalBoard v3.1a having 100 K pull-down - on SODIMM pin 45 - Note3: menu-key active-high due to strong pull-down on multiplexed - ACC1_DETECT */ + * Note: active-low means pull-ups required on carrier board resp. via + * pin-muxing + * Note2: power-key active-high due to EvalBoard v3.1a having 100 K pull-down + * on SODIMM pin 45 + * Note3: menu-key active-high due to strong pull-down on multiplexed + * ACC1_DETECT + * Note4: Wake keys need to be supported by hardware, see wakeups-t2.h + */ #ifdef CONFIG_KEYBOARD_GPIO #define GPIO_KEY(_id, _gpio, _lowactive, _iswake) \ @@ -576,7 +578,7 @@ static void colibri_t20_i2c_init(void) static struct gpio_keys_button colibri_t20_keys[] = { GPIO_KEY(KEY_FIND, PT3, 1, 0), /* SODIMM pin 77 */ GPIO_KEY(KEY_HOME, PBB3, 1, 0), /* SODIMM pin 127 */ - GPIO_KEY(KEY_BACK, PBB2, 1, 1), /* SODIMM pin 133, + GPIO_KEY(KEY_BACK, PBB2, 1, 0), /* SODIMM pin 133, Iris X16-14 */ GPIO_KEY(KEY_VOLUMEUP, PBB4, 1, 0), /* SODIMM pin 22 */ GPIO_KEY(KEY_VOLUMEDOWN, PBB5, 1, 0), /* SODIMM pin 24 */ diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c index b6b2be98383e..af8fdeaddf75 100644 --- a/arch/arm/mach-tegra/board-colibri_t30.c +++ b/arch/arm/mach-tegra/board-colibri_t30.c @@ -572,10 +572,12 @@ static void __init colibri_t30_i2c_init(void) } /* Keys - Note: active-low means pull-ups required on carrier board resp. via - pin-muxing - Note2: power-key active-high due to EvalBoard v3.1a having 100 K pull-down - on SODIMM pin 45 */ + * Note: active-low means pull-ups required on carrier board resp. via + * pin-muxing + * Note2: power-key active-high due to EvalBoard v3.1a having 100 K pull-down + * on SODIMM pin 45 + * Note3: Wake keys need to be supported by hardware, see wakeups-t3.h + */ #ifdef CONFIG_KEYBOARD_GPIO #define GPIO_KEY(_id, _gpio, _lowactive, _iswake) \ @@ -589,12 +591,13 @@ static void __init colibri_t30_i2c_init(void) .debounce_interval = 10, \ } +/* Note: Only wake-able gpios can be used as wakeup keys */ static struct gpio_keys_button colibri_t30_keys[] = { #ifndef COLIBRI_T30_VI GPIO_KEY(KEY_FIND, PCC2, 1, 0), /* SODIMM pin 77 */ #endif GPIO_KEY(KEY_HOME, PT6, 1, 0), /* SODIMM pin 127 */ - GPIO_KEY(KEY_BACK, PT5, 1, 1), /* SODIMM pin 133, + GPIO_KEY(KEY_BACK, PT5, 1, 0), /* SODIMM pin 133, Iris X16-14 */ GPIO_KEY(KEY_VOLUMEUP, PDD7, 1, 0), /* SODIMM pin 22 */ GPIO_KEY(KEY_VOLUMEDOWN, PCC6, 1, 0), /* SODIMM pin 24 */ diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 1def6f105d6b..ec1bd9009288 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -790,7 +790,7 @@ static int gpio_keys_suspend(struct device *dev) for (i = 0; i < ddata->n_buttons; i++) { struct gpio_button_data *bdata = &ddata->data[i]; if (bdata->button->wakeup) - enable_irq_wake(bdata->irq); + WARN_ON(enable_irq_wake(bdata->irq)); } } -- cgit v1.2.3