[PATCH 1/1] Bypass probe_on_irq in ucb1400_ts

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alex Raimondi
Date: Tuesday, October 14, 2008 - 12:15 pm

Irq probing in ucb1400_ts (drivers/input/touchscreen) fails (at least on 
our AVR32 board). On irq probing system hangs. 

This patch introduces a module parameter 'irq' to specify the irq line to 
use.  If modul is loaded with this parameter irq probing is bypassed, 
otherwise irq is probed.

I don't know who is actually maintaining the ucb1400_ts code. But I didn't 
want to sneak it in with our Hammerhead board code. Maybe you have an idea 
why irq probing fails.


Alex

From 35cfb1355ace42fb6e83c34b0a0dd626a6f81d6e Mon Sep 17 00:00:00 2001
From: Alex Raimondi <mailinglist@miromico.ch>
Date: Tue, 14 Oct 2008 16:20:19 +0200
Subject: [PATCH 6/7] Automatic irq probing fails (at least) on AVR32 (system hangs). This
 patch introduces a module parameter in ucb1400_ts which allows to
 bypass irq probing by specifying the irq to use on the command line.


Signed-off-by: Alex Raimondi <mailinglist@miromico.ch>
---
 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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/1] Bypass probe_on_irq in ucb1400_ts, Alex Raimondi, (Tue Oct 14, 12:15 pm)