Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5b16c5296c3276bb409a948173d557241b74379
Commit:     b5b16c5296c3276bb409a948173d557241b74379
Parent:     293e6392d72dfaef1f6aef605769869512bec45d
Author:     Cliff Brake <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 01:35:43 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Thu Apr 12 01:35:43 2007 -0400

    Input: ucb1400 - make delays configurable
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 drivers/input/touchscreen/ucb1400_ts.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/ucb1400_ts.c 
b/drivers/input/touchscreen/ucb1400_ts.c
index 5200f4c..24000f0 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 = 55; /* us */
+static int ts_delay_pressure;  /* us */
 
 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);
        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);
 
        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);
 
        return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX);
 }
@@ -571,7 +574,15 @@ static void __exit ucb1400_ts_exit(void)
        driver_unregister(&ucb1400_ts_driver);
 }
 
-module_param(adcsync, int, 0444);
+module_param(adcsync, bool, 0444);
+MODULE_PARM_DESC(adcsync, "Synchronize touch readings with ADCSYNC pin.");
+
+module_param(ts_delay, int, 0444);
+MODULE_PARM_DESC(ts_delay, "Delay between panel setup and position read. 
Default = 55us.");
+
+module_param(ts_delay_pressure, int, 0444);
+MODULE_PARM_DESC(ts_delay_pressure,
+                 "delay between panel setup and pressure read.  Default = 
0us.");
 
 module_init(ucb1400_ts_init);
 module_exit(ucb1400_ts_exit);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to