aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2009-06-08 23:46:53 +0400
committerNelson Castillo <arhuaco@freaks-unidos.net>2009-06-09 21:31:02 -0300
commit6fbbacd00b2e6e09583b0f88aed39a7a6cfb6c81 (patch)
treef5790026d3ddbc497e3fcd8c56d652b6aa3326f2 /drivers/input/keyboard
parent6e7fee4b8ed7a8669d5e4eaa492e8c6cb6105de6 (diff)
GTA0[12]: make headset button report PLAY pressed on press
As discussed on the ML, currently headset button reports "KEY_PAUSE released" on press and "pressed" on release. For "pause" semantics it makes sense but if someone thinks of that as of just another button, it'd be good to have "pressed/released" events consistent with button press/release. Luca Capello <luca@pca.it> suggested to change the button event to KEY_PLAY and to invert the state to make it more consistent. This trivial patch inverts button events for GTA03 KEY_PLUS and KEY_MINUS, i'm not sure how undesirable that is. I can prepare an alternative that preserves current behaviour on GTA03 per request. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/neo1973kbd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c
index a95dd5806d2..8756ae60910 100644
--- a/drivers/input/keyboard/neo1973kbd.c
+++ b/drivers/input/keyboard/neo1973kbd.c
@@ -75,7 +75,7 @@ static struct neo1973kbd_key keys[] = {
[NEO1973_KEY_HOLD] = {
.name = "Neo1973 HOLD button",
.isr = neo1973kbd_default_key_irq,
- .input_key = KEY_PAUSE,
+ .input_key = KEY_PLAY,
},
[NEO1973_KEY_JACK] = {
.name = "Neo1973 Headphone jack",
@@ -161,7 +161,7 @@ static irqreturn_t neo1973kbd_default_key_irq(int irq, void *dev_id)
continue;
input_report_key(kbd->input, keys[n].input_key,
- gpio_get_value(kbd->pdev->resource[n].start));
+ !gpio_get_value(kbd->pdev->resource[n].start));
input_sync(kbd->input);
}
@@ -346,7 +346,7 @@ static int neo1973kbd_probe(struct platform_device *pdev)
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_SW);
set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
set_bit(KEY_PHONE, input_dev->keybit);
- set_bit(KEY_PAUSE, input_dev->keybit);
+ set_bit(KEY_PLAY, input_dev->keybit);
rc = input_register_device(neo1973kbd->input);
if (rc)