]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch
linux-ti33x-psp 3.2: update to 3.2.23
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / beaglebone / 0065-ti_tscadc-switch-to-16x-averaging.patch
1 From bd18b67644c8107920db6911aa16be680af23cf1 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Mon, 28 May 2012 09:56:45 +0200
4 Subject: [PATCH 65/79] ti_tscadc: switch to 16x averaging
6 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7 ---
8  drivers/input/touchscreen/ti_tscadc.c |    8 ++++----
9  1 file changed, 4 insertions(+), 4 deletions(-)
11 diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
12 index 7df7bb2..ae6c4c4 100644
13 --- a/drivers/input/touchscreen/ti_tscadc.c
14 +++ b/drivers/input/touchscreen/ti_tscadc.c
15 @@ -161,7 +161,7 @@ static void tsc_adc_step_config(struct tscadc *ts_dev, int channel)
16          * sample channel 1 (SEL_INP mux bits = 0)
17          */
18         stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT |
19 -               TSCADC_STEPCONFIG_4SAMPLES_AVG |
20 +               TSCADC_STEPCONFIG_16SAMPLES_AVG |
21                 ((channel-1) << 19);
22         
23         delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
24 @@ -242,7 +242,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
25         delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
26  
27         stepconfigx = TSCADC_STEPCONFIG_MODE_HWSYNC |
28 -                       TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_XPP;
29 +                       TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_XPP;
30  
31         switch (ts_dev->wires) {
32         case 4:
33 @@ -279,7 +279,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
34         }
35  
36         stepconfigy = TSCADC_STEPCONFIG_MODE_HWSYNC |
37 -                       TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_YNN |
38 +                       TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_YNN |
39                         TSCADC_STEPCONFIG_INM | TSCADC_STEPCONFIG_FIFO1;
40         switch (ts_dev->wires) {
41         case 4:
42 @@ -324,7 +324,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
43  
44          /* Configure to calculate pressure */
45         stepconfigz1 = TSCADC_STEPCONFIG_MODE_HWSYNC |
46 -                               TSCADC_STEPCONFIG_4SAMPLES_AVG |
47 +                               TSCADC_STEPCONFIG_16SAMPLES_AVG |
48                                 TSCADC_STEPCONFIG_XNP |
49                                 TSCADC_STEPCONFIG_YPN | TSCADC_STEPCONFIG_INM;
50         stepconfigz2 = stepconfigz1 | TSCADC_STEPCONFIG_Z1 |
51 -- 
52 1.7.10