diff options
| author | Amit Jain <ajain@motorola.com> | 2014-10-04 20:13:37 +0000 |
|---|---|---|
| committer | Amit Jain <ajain@motorola.com> | 2014-10-04 20:13:37 +0000 |
| commit | b431796a84b21383566d0d1b1728da4fe265a357 (patch) | |
| tree | 2b2ee8a290f4f89da8ca48aefba8e6b4abe47f43 /drivers/mfd/tps65912-irq.c | |
| parent | 58efe519a5477c70a184cdf376520122127f69f0 (diff) | |
| download | olio-linux-3.10-b431796a84b21383566d0d1b1728da4fe265a357.tar.xz olio-linux-3.10-b431796a84b21383566d0d1b1728da4fe265a357.zip | |
Revert "IKXCLOCK-4061: power key behavior change"
This reverts commit 58efe519a5477c70a184cdf376520122127f69f0.
Change-Id: I8a80fcb5d7386ac8c74da99aa649ad549d64d3a1
Diffstat (limited to 'drivers/mfd/tps65912-irq.c')
| -rw-r--r-- | drivers/mfd/tps65912-irq.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/mfd/tps65912-irq.c b/drivers/mfd/tps65912-irq.c index 9637a632e19..766ed7dd8f5 100644 --- a/drivers/mfd/tps65912-irq.c +++ b/drivers/mfd/tps65912-irq.c @@ -34,7 +34,6 @@ static inline int irq_to_tps65912_irq(struct tps65912 *tps65912, static irqreturn_t powerkey_handler(int irq, void *irq_data) { struct tps65912 *tps65912 = irq_data; - unsigned int code = tps65912->powerkey_code; u32 new_state; if (irq - tps65912->irq_base == tps65912->powerkey_up_irq) { @@ -48,36 +47,9 @@ static irqreturn_t powerkey_handler(int irq, void *irq_data) } mutex_lock(&tps65912->irq_lock); - -#ifdef CONFIG_POWER_KEY_OVERRIDE - /* if we are not on dock, send the sleep key*/ - /* this logic is a bit tricky, notifier from - display driver will trigger on keypress which will - interfere with the logic for keyrelease. we will - see key press sent for KEY_POWER, but key release - for KEY_SLEEP. To fix this, we cache the event code - being sent out for keypress and we always send the - cached event code for key release */ - - if (new_state == PWRKEY_PRESS) { - if (tps65912->dockstatus == false && - tps65912->displaystatus == true) - code = KEY_SLEEP; - - tps65912->lastkeyevent = code; - } - - if (new_state == PWRKEY_RELEASE) { - code = tps65912->lastkeyevent; - /* Deliberately setting to -1, to catch - errors */ - tps65912->lastkeyevent = -1; - } -#endif - if (new_state != tps65912->powerkey_state) { tps65912_broadcast_key_event(tps65912, - code, + tps65912->powerkey_code, new_state); tps65912->powerkey_state = new_state; } |