diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0009-tscadc-make-stepconfig-channel-configurable.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0009-tscadc-make-stepconfig-channel-configurable.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0009-tscadc-make-stepconfig-channel-configurable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0009-tscadc-make-stepconfig-channel-configurable.patch new file mode 100644 index 00000000..47d9b248 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0009-tscadc-make-stepconfig-channel-configurable.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 750ca3e9b053119b867d3630bf5c891b845144b3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <joelagnel@ti.com> | ||
3 | Date: Mon, 28 Nov 2011 18:18:04 -0600 | ||
4 | Subject: [PATCH 09/22] tscadc: make stepconfig channel-configurable | ||
5 | |||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | ||
7 | --- | ||
8 | drivers/input/touchscreen/ti_tscadc.c | 8 +++++--- | ||
9 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c | ||
12 | index f813564..0b91bdc 100644 | ||
13 | --- a/drivers/input/touchscreen/ti_tscadc.c | ||
14 | +++ b/drivers/input/touchscreen/ti_tscadc.c | ||
15 | @@ -129,7 +129,9 @@ static void tscadc_writel(struct tscadc *tsc, unsigned int reg, | ||
16 | writel(val, tsc->tsc_base + reg); | ||
17 | } | ||
18 | |||
19 | -static void tsc_adc_step_config(struct tscadc *ts_dev) | ||
20 | +/* Configure ADC to sample on channel (1-8) */ | ||
21 | + | ||
22 | +static void tsc_adc_step_config(struct tscadc *ts_dev, int channel) | ||
23 | { | ||
24 | unsigned int stepconfig = 0, delay = 0, chargeconfig = 0; | ||
25 | |||
26 | @@ -141,7 +143,7 @@ static void tsc_adc_step_config(struct tscadc *ts_dev) | ||
27 | */ | ||
28 | stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT | | ||
29 | TSCADC_STEPCONFIG_2SAMPLES_AVG | | ||
30 | - (0x7 << 19); | ||
31 | + ((channel-1) << 19); | ||
32 | |||
33 | delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY; | ||
34 | |||
35 | @@ -602,7 +604,7 @@ static int __devinit tscadc_probe(struct platform_device *pdev) | ||
36 | goto err_fail; | ||
37 | } | ||
38 | else { | ||
39 | - tsc_adc_step_config(ts_dev); | ||
40 | + tsc_adc_step_config(ts_dev, 8); | ||
41 | tscadc_writel(ts_dev, TSCADC_REG_FIFO0THR, 0); | ||
42 | irqenable = TSCADC_IRQENB_FIFO0THRES; | ||
43 | } | ||
44 | -- | ||
45 | 1.7.9.4 | ||
46 | |||