aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:55 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:55 +0000
commit66c698f261b49b56a9f47a3347e9496346fd64ff (patch)
tree585b7540435e275e2643682ae1eb25dbe152bfc2 /drivers/input/keyboard
parentea04c30f6c6eea67deb97040398bd449906cbb72 (diff)
fix-aux-key-level-by-gtaxx.patch
Reported-by: Mickey Lauer <mickey@openmoko.org> AUX level detection is inverted based on GTA01 or 02 Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/neo1973kbd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c
index 3076af3a16c..70d8bc051df 100644
--- a/drivers/input/keyboard/neo1973kbd.c
+++ b/drivers/input/keyboard/neo1973kbd.c
@@ -39,8 +39,11 @@ struct neo1973kbd {
static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
{
struct neo1973kbd *neo1973kbd_data = dev_id;
+ int key_pressed = !gpio_get_value(irq_to_gpio(irq));
- int key_pressed = !!gpio_get_value(irq_to_gpio(irq));
+ /* GTA02 has inverted sense level compared to GTA01 */
+ if (machine_is_neo1973_gta02())
+ key_pressed = !key_pressed;
input_report_key(neo1973kbd_data->input, KEY_PHONE, key_pressed);
input_sync(neo1973kbd_data->input);