Skip to content

Commit 3954b7b

Browse files
Sebastian Andrzej SiewiorLee Jones
authored andcommitted
mfd: ti_am335x: Drop am335x_tsc_se_update() from resume path
The update of the SE register in MFD doesn't look right as it has nothing to do with it. The better place to do it is in TSC driver (which is already doing it) and in the ADC driver which needs this only in the continues mode. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 7e170c6 commit 3954b7b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/iio/adc/ti_am335x_adc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)
199199
tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
200200
IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW));
201201
am335x_tsc_se_clr(adc_dev->mfd_tscadc, adc_dev->buffer_en_ch_steps);
202+
adc_dev->buffer_en_ch_steps = 0;
202203

203204
/* Flush FIFO of leftover data in the time it takes to disable adc */
204205
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
@@ -491,6 +492,7 @@ static int tiadc_resume(struct device *dev)
491492
tiadc_writel(adc_dev, REG_CTRL, restore);
492493

493494
tiadc_step_config(indio_dev);
495+
am335x_tsc_se_set(adc_dev->mfd_tscadc, adc_dev->buffer_en_ch_steps);
494496

495497
return 0;
496498
}

‎drivers/mfd/ti_am335x_tscadc.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static int tscadc_resume(struct device *dev)
309309

310310
if (tscadc_dev->tsc_cell != -1)
311311
tscadc_idle_config(tscadc_dev);
312-
am335x_tsc_se_update(tscadc_dev);
313312
restore = tscadc_readl(tscadc_dev, REG_CTRL);
314313
tscadc_writel(tscadc_dev, REG_CTRL,
315314
(restore | CNTRLREG_TSCSSENB));

0 commit comments

Comments
 (0)