diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-06-28 01:25:19 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-28 01:34:25 -0700 |
commit | 7804302b14032d357d889e4a23e463eb6a6c5136 (patch) | |
tree | c71800f52507e70691786347c96168724dcf6ea4 /drivers/input | |
parent | c8f2edc56acf0a55ede777c07314c9744bb723be (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')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 5 |
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) goto err_put_regulator; } - if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, + if (!pdata->irq_flags) + pdata->irq_flags = IRQF_TRIGGER_FALLING; + + if (request_irq(spi->irq, ads7846_irq, pdata->irq_flags, spi->dev.driver->name, ts)) { dev_info(&spi->dev, "trying pin change workaround on irq %d\n", spi->irq); |