[PATCH 6/7] Automatic irq probing fails (at least) on AVR32 (system hangs). Thispatch introduces a module parameter in ucb1400_ts which allows tobypass irq probing by specifying the irq to use on the command line.

From: Alex Raimondi
Date: Tue Oct 14 2008 - 10:20:19 EST



Signed-off-by: Alex Raimondi <mailinglist@xxxxxxxxxxx>
---
drivers/input/touchscreen/ucb1400_ts.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 607f993..09bd395 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -97,6 +97,10 @@ struct ucb1400 {
static int adcsync;
static int ts_delay = 55; /* us */
static int ts_delay_pressure; /* us */
+static int irq;
+
+module_param(irq, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
+MODULE_PARM_DESC(irq, "IRQ");

static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg)
{
@@ -484,6 +488,8 @@ static int ucb1400_ts_probe(struct device *dev)
ucb->ts_idev = idev;
ucb->adcsync = adcsync;
ucb->ac97 = to_ac97_t(dev);
+ ucb->irq = irq;
+
init_waitqueue_head(&ucb->ts_wait);

id = ucb1400_reg_read(ucb, UCB_ID);
@@ -492,12 +498,15 @@ static int ucb1400_ts_probe(struct device *dev)
goto err_free_devs;
}

- error = ucb1400_detect_irq(ucb);
- if (error) {
- printk(KERN_ERR "UCB1400: IRQ probe failed\n");
- goto err_free_devs;
+ if (ucb->irq == 0) {
+ error = ucb1400_detect_irq(ucb);
+ if (error) {
+ printk(KERN_ERR "UCB1400: IRQ probe failed\n");
+ goto err_free_devs;
+ }
}

+
error = request_irq(ucb->irq, ucb1400_hard_irq, IRQF_TRIGGER_RISING,
"UCB1400", ucb);
if (error) {
--
1.5.5.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/