Permalink
Browse files

ti_tscadc: switch to 16x averaging

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
1 parent 17e9236 commit 7756e470729106e7394cb077a06c0ba47f08fb49 @koenkooi koenkooi committed May 28, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 drivers/input/touchscreen/ti_tscadc.c
View
8 drivers/input/touchscreen/ti_tscadc.c
@@ -161,7 +161,7 @@ static void tsc_adc_step_config(struct tscadc *ts_dev, int channel)
* sample channel 1 (SEL_INP mux bits = 0)
*/
stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT |
- TSCADC_STEPCONFIG_4SAMPLES_AVG |
+ TSCADC_STEPCONFIG_16SAMPLES_AVG |
((channel-1) << 19);
delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
@@ -242,7 +242,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
stepconfigx = TSCADC_STEPCONFIG_MODE_HWSYNC |
- TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_XPP;
+ TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_XPP;
switch (ts_dev->wires) {
case 4:
@@ -279,7 +279,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
}
stepconfigy = TSCADC_STEPCONFIG_MODE_HWSYNC |
- TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_YNN |
+ TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_YNN |
TSCADC_STEPCONFIG_INM | TSCADC_STEPCONFIG_FIFO1;
switch (ts_dev->wires) {
case 4:
@@ -324,7 +324,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
/* Configure to calculate pressure */
stepconfigz1 = TSCADC_STEPCONFIG_MODE_HWSYNC |
- TSCADC_STEPCONFIG_4SAMPLES_AVG |
+ TSCADC_STEPCONFIG_16SAMPLES_AVG |
TSCADC_STEPCONFIG_XNP |
TSCADC_STEPCONFIG_YPN | TSCADC_STEPCONFIG_INM;
stepconfigz2 = stepconfigz1 | TSCADC_STEPCONFIG_Z1 |

0 comments on commit 7756e47

Please sign in to comment.