mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
c8f2edc56a
commit
7804302b14
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -54,5 +54,6 @@ struct ads7846_platform_data {
|
|||
void (*filter_cleanup)(void *filter_data);
|
||||
void (*wait_for_sync)(void);
|
||||
bool wakeup;
|
||||
unsigned long irq_flags;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue