diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-06-28 04:25:19 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-28 04:34:25 -0400 |
commit | 7804302b14032d357d889e4a23e463eb6a6c5136 (patch) | |
tree | c71800f52507e70691786347c96168724dcf6ea4 /drivers/input/touchscreen | |
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/touchscreen')
-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) | |||
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); |