aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-06-28 04:25:19 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-06-28 04:34:25 -0400
commit7804302b14032d357d889e4a23e463eb6a6c5136 (patch)
treec71800f52507e70691786347c96168724dcf6ea4 /drivers/input/touchscreen
parentc8f2edc56acf0a55ede777c07314c9744bb723be (diff)
Input: ads7846 - allow specifying irq trigger type in platform data
On some platforms, for example with GPIO interrupts on mpc5121, it is not possible to configure falling edge interrupts. Specifying irq trigger type in platform data structure allows using ads7846 driver on such platforms. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/ads7846.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index a9fdf55c023..69210cb56c5 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1174,7 +1174,10 @@ static int __devinit ads7846_probe(struct spi_device *spi)
1174 goto err_put_regulator; 1174 goto err_put_regulator;
1175 } 1175 }
1176 1176
1177 if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, 1177 if (!pdata->irq_flags)
1178 pdata->irq_flags = IRQF_TRIGGER_FALLING;
1179
1180 if (request_irq(spi->irq, ads7846_irq, pdata->irq_flags,
1178 spi->dev.driver->name, ts)) { 1181 spi->dev.driver->name, ts)) {
1179 dev_info(&spi->dev, 1182 dev_info(&spi->dev,
1180 "trying pin change workaround on irq %d\n", spi->irq); 1183 "trying pin change workaround on irq %d\n", spi->irq);