Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53439
b: refs/heads/master
c: b5b16c5
h: refs/heads/master
i:
  53437: daea1b0
  53435: 411afcf
  53431: d48592b
  53423: 4144c95
  53407: 95eba17
  53375: b493e10
v: v3
  • Loading branch information
Cliff Brake authored and Dmitry Torokhov committed Apr 12, 2007
1 parent f38e529 commit e74f914
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 293e6392d72dfaef1f6aef605769869512bec45d
refs/heads/master: b5b16c5296c3276bb409a948173d557241b74379
17 changes: 14 additions & 3 deletions trunk/drivers/input/touchscreen/ucb1400_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e74f914

Please sign in to comment.