aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index b730864731e8..adba23246474 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -86,19 +86,18 @@ static void tiadc_step_config(struct iio_dev *indio_dev)
86{ 86{
87 struct tiadc_device *adc_dev = iio_priv(indio_dev); 87 struct tiadc_device *adc_dev = iio_priv(indio_dev);
88 unsigned int stepconfig; 88 unsigned int stepconfig;
89 int i, steps; 89 int i, steps = 0;
90 90
91 /* 91 /*
92 * There are 16 configurable steps and 8 analog input 92 * There are 16 configurable steps and 8 analog input
93 * lines available which are shared between Touchscreen and ADC. 93 * lines available which are shared between Touchscreen and ADC.
94 * 94 *
95 * Steps backwards i.e. from 16 towards 0 are used by ADC 95 * Steps forwards i.e. from 0 towards 16 are used by ADC
96 * depending on number of input lines needed. 96 * depending on number of input lines needed.
97 * Channel would represent which analog input 97 * Channel would represent which analog input
98 * needs to be given to ADC to digitalize data. 98 * needs to be given to ADC to digitalize data.
99 */ 99 */
100 100
101 steps = TOTAL_STEPS - adc_dev->channels;
102 if (iio_buffer_enabled(indio_dev)) 101 if (iio_buffer_enabled(indio_dev))
103 stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1 102 stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1
104 | STEPCONFIG_MODE_SWCNT; 103 | STEPCONFIG_MODE_SWCNT;