aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
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
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')
-rw-r--r--drivers/input/touchscreen/Kconfig2
-rw-r--r--drivers/input/touchscreen/ti_am335x_tsc.c4
-rw-r--r--drivers/input/touchscreen/zforce_ts.c21
3 files changed, 18 insertions, 9 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 961d58d32647..07e9e82029d1 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -717,7 +717,7 @@ config TOUCHSCREEN_USB_COMPOSITE
717 717
718config TOUCHSCREEN_MC13783 718config TOUCHSCREEN_MC13783
719 tristate "Freescale MC13783 touchscreen input driver" 719 tristate "Freescale MC13783 touchscreen input driver"
720 depends on MFD_MC13783 720 depends on MFD_MC13XXX
721 help 721 help
722 Say Y here if you have an Freescale MC13783 PMIC on your 722 Say Y here if you have an Freescale MC13783 PMIC on your
723 board and want to use its touchscreen 723 board and want to use its touchscreen
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index 6c9cd1268dc3..4e793a17361f 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -197,7 +197,7 @@ static void titsc_step_config(struct titsc *ts_dev)
197 /* The steps1 … end and bit 0 for TS_Charge */ 197 /* The steps1 … end and bit 0 for TS_Charge */
198 stepenable = (1 << (end_step + 2)) - 1; 198 stepenable = (1 << (end_step + 2)) - 1;
199 ts_dev->step_mask = stepenable; 199 ts_dev->step_mask = stepenable;
200 am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); 200 am335x_tsc_se_set_cache(ts_dev->mfd_tscadc, ts_dev->step_mask);
201} 201}
202 202
203static void titsc_read_coordinates(struct titsc *ts_dev, 203static void titsc_read_coordinates(struct titsc *ts_dev,
@@ -321,7 +321,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
321 321
322 if (irqclr) { 322 if (irqclr) {
323 titsc_writel(ts_dev, REG_IRQSTATUS, irqclr); 323 titsc_writel(ts_dev, REG_IRQSTATUS, irqclr);
324 am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); 324 am335x_tsc_se_set_cache(ts_dev->mfd_tscadc, ts_dev->step_mask);
325 return IRQ_HANDLED; 325 return IRQ_HANDLED;
326 } 326 }
327 return IRQ_NONE; 327 return IRQ_NONE;
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) {