aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/zforce_ts.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-01 13:31:53 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-01 13:31:53 -0500
commit04421fe2671c1790ab6529fad87ce8c73af0e1eb (patch)
treed2f803b4eef6108648f1beee6bf97a342cd9bc73 /drivers/input/touchscreen/zforce_ts.c
parent7fb45edba8b5206e645572a682c946f67375447e (diff)
parentcfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff)
Merge tag 'v3.14-rc4' into next
Merge with Linux 3.14-rc4 to bring devm_request_any_context_irq().
Diffstat (limited to 'drivers/input/touchscreen/zforce_ts.c')
-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 bdc936cb8445..01d30cedde46 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -461,7 +461,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result)
461 } 461 }
462} 462}
463 463
464static irqreturn_t zforce_interrupt(int irq, void *dev_id) 464static irqreturn_t zforce_irq(int irq, void *dev_id)
465{
466 struct zforce_ts *ts = dev_id;
467 struct i2c_client *client = ts->client;
468
469 if (ts->suspended && device_may_wakeup(&client->dev))
470 pm_wakeup_event(&client->dev, 500);
471
472 return IRQ_WAKE_THREAD;
473}
474
475static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
465{ 476{
466 struct zforce_ts *ts = dev_id; 477 struct zforce_ts *ts = dev_id;
467 struct i2c_client *client = ts->client; 478 struct i2c_client *client = ts->client;
@@ -471,12 +482,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id)
471 u8 *payload; 482 u8 *payload;
472 483
473 /* 484 /*
474 * When suspended, emit a wakeup signal if necessary and return. 485 * When still suspended, return.
475 * Due to the level-interrupt we will get re-triggered later. 486 * Due to the level-interrupt we will get re-triggered later.
476 */ 487 */
477 if (ts->suspended) { 488 if (ts->suspended) {
478 if (device_may_wakeup(&client->dev))
479 pm_wakeup_event(&client->dev, 500);
480 msleep(20); 489 msleep(20);
481 return IRQ_HANDLED; 490 return IRQ_HANDLED;
482 } 491 }
@@ -814,8 +823,8 @@ static int zforce_probe(struct i2c_client *client,
814 * Therefore we can trigger the interrupt anytime it is low and do 823 * Therefore we can trigger the interrupt anytime it is low and do
815 * not need to limit it to the interrupt edge. 824 * not need to limit it to the interrupt edge.
816 */ 825 */
817 ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, 826 ret = devm_request_threaded_irq(&client->dev, client->irq,
818 zforce_interrupt, 827 zforce_irq, zforce_irq_thread,
819 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 828 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
820 input_dev->name, ts); 829 input_dev->name, ts);
821 if (ret) { 830 if (ret) {