[oe-commits] org.oe.dev logicpd-pxa270-2.6.17: touchscreen load/unload fix (Shane Volpe)

cbrake commit openembedded-commits at lists.openembedded.org
Mon Nov 13 19:13:56 UTC 2006


logicpd-pxa270-2.6.17: touchscreen load/unload fix (Shane Volpe)
fix for problem where touch is required to load/unload the driver

Author: cbrake at openembedded.org
Branch: org.openembedded.dev
Revision: 119a1b8e3787f193a0a34391450debc2878897c4
ViewMTN: http://monotone.openembedded.org/revision.psp?id=119a1b8e3787f193a0a34391450debc2878897c4
Files:
1
packages/linux/logicpd-pxa270-2.6.17-rc5/ucb1400-touchscreen.patch
Diffs:

#
# mt diff -r9ebe19c38b13611632684c440b048e45471bf916 -r119a1b8e3787f193a0a34391450debc2878897c4
#
# 
# 
# patch "packages/linux/logicpd-pxa270-2.6.17-rc5/ucb1400-touchscreen.patch"
#  from [32673a857f878803615b3435a1644cc913798cee]
#    to [1bcedb018229c308c54caf509cb928dfda48224d]
# 
============================================================
--- packages/linux/logicpd-pxa270-2.6.17-rc5/ucb1400-touchscreen.patch	32673a857f878803615b3435a1644cc913798cee
+++ packages/linux/logicpd-pxa270-2.6.17-rc5/ucb1400-touchscreen.patch	1bcedb018229c308c54caf509cb928dfda48224d
@@ -375,7 +375,7 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  
  #include "ucb1x00.h"
  
-@@ -45,7 +43,7 @@ struct ucb1x00_ts {
+@@ -45,13 +43,14 @@ struct ucb1x00_ts {
  	struct input_dev	*idev;
  	struct ucb1x00		*ucb;
  
@@ -384,7 +384,14 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  	struct task_struct	*rtask;
  	u16			x_res;
  	u16			y_res;
-@@ -205,7 +203,6 @@ static int ucb1x00_thread(void *_ts)
+ 
+ 	unsigned int		restart:1;
+ 	unsigned int		adcsync:1;
++	unsigned int		go_thread;
+ };
+ 
+ static int adcsync;
+@@ -205,7 +204,6 @@ static int ucb1x00_thread(void *_ts)
  {
  	struct ucb1x00_ts *ts = _ts;
  	struct task_struct *tsk = current;
@@ -392,18 +399,19 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  	int valid;
  
  	/*
-@@ -217,10 +214,8 @@ static int ucb1x00_thread(void *_ts)
+@@ -217,10 +215,8 @@ static int ucb1x00_thread(void *_ts)
  
  	valid = 0;
  
 -	add_wait_queue(&ts->irq_wait, &wait);
- 	while (!kthread_should_stop()) {
+-	while (!kthread_should_stop()) {
++	while (!kthread_should_stop() && ts->go_thread) {
  		unsigned int x, y, p;
 -		signed long timeout;
  
  		ts->restart = 0;
  
-@@ -242,8 +237,6 @@ static int ucb1x00_thread(void *_ts)
+@@ -242,8 +238,6 @@ static int ucb1x00_thread(void *_ts)
  
  
  		if (ucb1x00_ts_pen_down(ts)) {
@@ -412,7 +420,7 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  			ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, machine_is_collie() ? UCB_RISING : UCB_FALLING);
  			ucb1x00_disable(ts->ucb);
  
-@@ -256,7 +249,15 @@ static int ucb1x00_thread(void *_ts)
+@@ -256,7 +250,16 @@ static int ucb1x00_thread(void *_ts)
  				valid = 0;
  			}
  
@@ -426,10 +434,11 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
 +			 * the issue.
 +			 */
 +			wait_for_completion_interruptible(&ts->irq_wait);
++
  		} else {
  			ucb1x00_disable(ts->ucb);
  
-@@ -271,16 +272,12 @@ static int ucb1x00_thread(void *_ts)
+@@ -271,16 +274,12 @@ static int ucb1x00_thread(void *_ts)
  			}
  
  			set_task_state(tsk, TASK_INTERRUPTIBLE);
@@ -447,7 +456,7 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  	ts->rtask = NULL;
  	return 0;
  }
-@@ -293,7 +290,7 @@ static void ucb1x00_ts_irq(int idx, void
+@@ -293,7 +292,7 @@ static void ucb1x00_ts_irq(int idx, void
  {
  	struct ucb1x00_ts *ts = id;
  	ucb1x00_disable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_FALLING);
@@ -456,7 +465,7 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  }
  
  static int ucb1x00_ts_open(struct input_dev *idev)
-@@ -303,7 +300,7 @@ static int ucb1x00_ts_open(struct input_
+@@ -303,7 +302,7 @@ static int ucb1x00_ts_open(struct input_
  
  	BUG_ON(ts->rtask);
  
@@ -465,7 +474,31 @@ Index: linux-2.6.17-rc5/drivers/mfd/ucb1
  	ret = ucb1x00_hook_irq(ts->ucb, UCB_IRQ_TSPX, ucb1x00_ts_irq, ts);
  	if (ret < 0)
  		goto out;
-@@ -358,7 +355,7 @@ static int ucb1x00_ts_resume(struct ucb1
+@@ -318,6 +317,8 @@ static int ucb1x00_ts_open(struct input_
+ 	ucb1x00_adc_disable(ts->ucb);
+ 
+ 	ts->rtask = kthread_run(ucb1x00_thread, ts, "ktsd");
++	ts->go_thread = 1; //start thread!
++
+ 	if (!IS_ERR(ts->rtask)) {
+ 		ret = 0;
+ 	} else {
+@@ -337,9 +338,14 @@ static void ucb1x00_ts_close(struct inpu
+ {
+ 	struct ucb1x00_ts *ts = idev->private;
+ 
++
++	ts->go_thread = 0; //Stop thread!
++	complete(&ts->irq_wait);
++
+ 	if (ts->rtask)
+ 		kthread_stop(ts->rtask);
+ 
++
+ 	ucb1x00_enable(ts->ucb);
+ 	ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
+ 	ucb1x00_reg_write(ts->ucb, UCB_TS_CR, 0);
+@@ -358,7 +364,7 @@ static int ucb1x00_ts_resume(struct ucb1
  		 * after sleep.
  		 */
  		ts->restart = 1;






More information about the Openembedded-commits mailing list