aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/zforce_ts.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 4ffe4cc3b234..2175f3419002 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -456,7 +456,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result)
456 } 456 }
457} 457}
458 458
459static irqreturn_t zforce_interrupt(int irq, void *dev_id) 459static irqreturn_t zforce_irq(int irq, void *dev_id)
460{
461 struct zforce_ts *ts = dev_id;
462 struct i2c_client *client = ts->client;
463
464 if (ts->suspended && device_may_wakeup(&client->dev))
465 pm_wakeup_event(&client->dev, 500);
466
467 return IRQ_WAKE_THREAD;
468}
469
470static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
460{ 471{
461 struct zforce_ts *ts = dev_id; 472 struct zforce_ts *ts = dev_id;
462 struct i2c_client *client = ts->client; 473 struct i2c_client *client = ts->client;
@@ -466,12 +477,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id)
466 u8 *payload; 477 u8 *payload;
467 478
468 /* 479 /*
469 * When suspended, emit a wakeup signal if necessary and return. 480 * When still suspended, return.
470 * Due to the level-interrupt we will get re-triggered later. 481 * Due to the level-interrupt we will get re-triggered later.
471 */ 482 */
472 if (ts->suspended) { 483 if (ts->suspended) {
473 if (device_may_wakeup(&client->dev))
474 pm_wakeup_event(&client->dev, 500);
475 msleep(20); 484 msleep(20);
476 return IRQ_HANDLED; 485 return IRQ_HANDLED;
477 } 486 }
@@ -764,8 +773,8 @@ static int zforce_probe(struct i2c_client *client,
764 * Therefore we can trigger the interrupt anytime it is low and do 773 * Therefore we can trigger the interrupt anytime it is low and do
765 * not need to limit it to the interrupt edge. 774 * not need to limit it to the interrupt edge.
766 */ 775 */
767 ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, 776 ret = devm_request_threaded_irq(&client->dev, client->irq,
768 zforce_interrupt, 777 zforce_irq, zforce_irq_thread,
769 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 778 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
770 input_dev->name, ts); 779 input_dev->name, ts);
771 if (ret) { 780 if (ret) {