diff options
| author | James Wylder <jwylder@motorola.com> | 2014-02-26 19:18:24 -0600 |
|---|---|---|
| committer | James Wylder <jwylder@motorola.com> | 2014-03-05 17:47:29 -0600 |
| commit | fb57b8a6b411647a35e380f23e1786ac6af72aff (patch) | |
| tree | 64f8dd1947ff0b61d222b4d34d2f819e22343838 /drivers | |
| parent | dba517b982b3c030377896ff99e7a9b877149e96 (diff) | |
| download | olio-linux-3.10-fb57b8a6b411647a35e380f23e1786ac6af72aff.tar.xz olio-linux-3.10-fb57b8a6b411647a35e380f23e1786ac6af72aff.zip | |
IKXCLOCK-221 tps65912: irq: revert to level interrupts
Revert the initialization to the original level
behavior, but in our case level high.
On xclock the key release is on a lower interrupt
than the key press. Handle the interrupts in decending
order to ensure the press is handled first.
Change-Id: Ie68255e1f0d67cce02eb59708e21cd2621e57e8f
Signed-off-by: James Wylder <jwylder@motorola.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mfd/tps65912-irq.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mfd/tps65912-irq.c b/drivers/mfd/tps65912-irq.c index c01efaaaf75..c930bf9f538 100644 --- a/drivers/mfd/tps65912-irq.c +++ b/drivers/mfd/tps65912-irq.c @@ -92,7 +92,7 @@ static irqreturn_t tps65912_irq(int irq, void *irq_data) if (!irq_sts) return IRQ_NONE; - for (i = 0; i < tps65912->irq_num; i++) { + for (i = tps65912->irq_num - 1; i >= 0; i--) { if (!(irq_sts & (1 << i))) continue; @@ -181,7 +181,6 @@ int tps65912_irq_init(struct tps65912 *tps65912, int irq, struct tps65912_platform_data *pdata) { int ret, cur_irq; - int flags = IRQF_ONESHOT|IRQF_TRIGGER_RISING; u8 reg; if (!irq) { @@ -232,22 +231,24 @@ int tps65912_irq_init(struct tps65912 *tps65912, int irq, #endif } - ret = request_threaded_irq(irq, NULL, tps65912_irq, flags, - "tps65912", tps65912); + ret = request_threaded_irq(irq, NULL, tps65912_irq, + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + "tps65912", tps65912); if (ret != 0) dev_err(tps65912->dev, "Failed to request IRQ: %d\n", ret); ret = request_threaded_irq(tps65912->irq_base + tps65912->powerkey_up_irq, NULL, powerkey_handler, - flags, "tps65912_key_rel", tps65912); + IRQF_TRIGGER_RISING | IRQF_ONESHOT, "tps65912_key_rel", + tps65912); if (ret != 0) dev_err(tps65912->dev, "Failed to request sub-IRQ for power key rel: %d\n", ret); ret = request_threaded_irq(tps65912->irq_base + - tps65912->powerkey_down_irq, - NULL, powerkey_handler, flags, - "tps65912_key_press", tps65912); + tps65912->powerkey_down_irq, NULL, powerkey_handler, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, "tps65912_key_press", + tps65912); if (ret != 0) dev_err(tps65912->dev, "Failed to request sub-IRQ for power key press: %d\n", ret); |