From: Anatolij Gustschin <agust@denx.de>
To: linux-input@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Subject: [PATCH 1/2] Input: ads7846 - allow specifying irq trigger type in platform data
Date: Fri, 30 Apr 2010 14:23:00 +0200 [thread overview]
Message-ID: <1272630181-5364-1-git-send-email-agust@denx.de> (raw)
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>
---
drivers/input/touchscreen/ads7846.c | 5 ++++-
include/linux/spi/ads7846.h | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 532279c..9cfc865 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_trigger)
+ pdata->irq_trigger = IRQF_TRIGGER_FALLING;
+
+ if (request_irq(spi->irq, ads7846_irq, pdata->irq_trigger,
spi->dev.driver->name, ts)) {
dev_info(&spi->dev,
"trying pin change workaround on irq %d\n", spi->irq);
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
index b4ae570..32e34ba 100644
--- a/include/linux/spi/ads7846.h
+++ b/include/linux/spi/ads7846.h
@@ -54,5 +54,6 @@ struct ads7846_platform_data {
void (*filter_cleanup)(void *filter_data);
void (*wait_for_sync)(void);
bool wakeup;
+ u8 irq_trigger;
};
--
1.6.3.3
next reply other threads:[~2010-04-30 17:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 12:23 Anatolij Gustschin [this message]
2010-04-30 12:23 ` [PATCH 2/2] Input: ads7846 - extend the driver for ads7845 controller support Anatolij Gustschin
2010-06-29 9:29 ` [PATCH v2 " Anatolij Gustschin
2010-06-30 8:18 ` Dmitry Torokhov
2010-06-30 8:45 ` Anatolij Gustschin
2010-07-01 11:23 ` Anatolij Gustschin
2010-07-01 11:26 ` [PATCH] Input: ads7846 - do not allow altering platform data Anatolij Gustschin
2010-07-01 16:10 ` Dmitry Torokhov
2010-05-31 19:28 ` [PATCH 1/2] Input: ads7846 - allow specifying irq trigger type in " Anatolij Gustschin
2010-06-25 9:35 ` Anatolij Gustschin
2010-06-28 8:32 ` Dmitry Torokhov
2010-06-29 7:24 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272630181-5364-1-git-send-email-agust@denx.de \
--to=agust@denx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=dzu@denx.de \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).