summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-11-08 19:45:54 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-20 00:52:05 -0800
commitfb141597550243b471f3bd526fe689aa3b74df25 (patch)
tree45083cd95cd520effed623449413ac21efa7b8a1 /drivers/input/touchscreen
parent765af10de6d93820def9978c53ed828e4d3bd4f4 (diff)
downloadop-kernel-dev-fb141597550243b471f3bd526fe689aa3b74df25.zip
op-kernel-dev-fb141597550243b471f3bd526fe689aa3b74df25.tar.gz
Input: ucb1400_ts - allow passing IRQ through platfrom_data
This patch allows UCB1400 to get IRQ GPIO from platform data. In case platform_data are not supplied or the IRQ supplied in the platform_data is negative, fall back to the old IRQ detection algorithm. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 095f84b..89dcbe7 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -355,10 +355,13 @@ static int ucb1400_ts_probe(struct platform_device *dev)
goto err;
}
- error = ucb1400_ts_detect_irq(ucb);
- if (error) {
- printk(KERN_ERR "UCB1400: IRQ probe failed\n");
- goto err_free_devs;
+ /* Only in case the IRQ line wasn't supplied, try detecting it */
+ if (ucb->irq < 0) {
+ error = ucb1400_ts_detect_irq(ucb);
+ if (error) {
+ printk(KERN_ERR "UCB1400: IRQ probe failed\n");
+ goto err_free_devs;
+ }
}
init_waitqueue_head(&ucb->ts_wait);
OpenPOWER on IntegriCloud