linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] UCB1400 add module parameters for settling delays
@ 2007-04-06 22:04 Cliff Brake
  2007-04-10  5:01 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Cliff Brake @ 2007-04-06 22:04 UTC (permalink / raw)
  To: linux-input

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

This patch adds module parameters for several delay values used in the driver.
These delays need to vary based on the hardware design and how much capacitive
filtering there is on the touch panel inputs, and the resistance of the panel.

Thanks,
Cliff

-- 
=======================
Cliff Brake
http://bec-systems.com

[-- Attachment #2: ucb1400_ts_delay_attributes.patch --]
[-- Type: application/octet-stream, Size: 2422 bytes --]

This patch adds module parameters for several timing values used in the driver.
These values can vary based on the hardware design and how much capacitive
filtering there is on the touch panel inputs, and the resistance of the panel.

Signed-off-by: Cliff Brake <cbrake@bec-systems.com>

---

 drivers/input/touchscreen/ucb1400_ts.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

base 100716c0f1cd4724b35e25b325ea5b3b07d12b75
last fe2614e9c3f181fd3f18b2ca6ef3952be8f93b47
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index e09f366b199342bcf5deb7508f7c87fbd31d4493..d94b2a31fb933e98324776d7260d7b3f746c0c59 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -97,6 +97,8 @@ struct ucb1400 {
 };
 
 static int adcsync;
+static int ts_delay_us = 55;
+static int ts_delay_pressure_us = 0;
 
 static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg)
 {
@@ -159,6 +161,7 @@ static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400 *ucb)
 			UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
 			UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
 			UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
+	udelay(ts_delay_pressure_us);
 	return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
 }
 
@@ -180,7 +183,7 @@ static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400 *ucb)
 			UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
 			UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
 
-	udelay(55);
+	udelay(ts_delay_us);
 
 	return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
 }
@@ -203,7 +206,7 @@ static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400 *ucb)
 			UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
 			UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
 
-	udelay(55);
+	udelay(ts_delay_us);
 
 	return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX);
 }
@@ -572,6 +575,14 @@ static void __exit ucb1400_ts_exit(void)
 }
 
 module_param(adcsync, int, 0444);
+MODULE_PARM_DESC(adcsync, "set to 1 to synchronize touch readings with ADCSYNC pin");
+
+module_param(ts_delay_us, int, 0444);
+MODULE_PARM_DESC(ts_delay_us, "delay between panel setup and position read (us).  Default = 55us.");
+
+module_param(ts_delay_pressure_us, int, 0444);
+MODULE_PARM_DESC(ts_delay_pressure_us, 
+		"delay between panel setup and pressure read (us).  Default = 0us.");
 
 module_init(ucb1400_ts_init);
 module_exit(ucb1400_ts_exit);
-- 
1.4.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] UCB1400 add module parameters for settling delays
  2007-04-06 22:04 [PATCH] UCB1400 add module parameters for settling delays Cliff Brake
@ 2007-04-10  5:01 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2007-04-10  5:01 UTC (permalink / raw)
  To: Cliff Brake; +Cc: linux-input

On Friday 06 April 2007 18:04, Cliff Brake wrote:
> This patch adds module parameters for several delay values used in the driver.
> These delays need to vary based on the hardware design and how much capacitive
> filtering there is on the touch panel inputs, and the resistance of the panel.
>

Applied to the input tree, thank you. 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-10  5:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 22:04 [PATCH] UCB1400 add module parameters for settling delays Cliff Brake
2007-04-10  5:01 ` Dmitry Torokhov

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).