提交 3954b7bf 编写于 作者: S Sebastian Andrzej Siewior 提交者: Lee Jones

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: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: NJonathan Cameron <jic23@kernel.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 7e170c6e
...@@ -199,6 +199,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev) ...@@ -199,6 +199,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)
tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW)); IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW));
am335x_tsc_se_clr(adc_dev->mfd_tscadc, adc_dev->buffer_en_ch_steps); am335x_tsc_se_clr(adc_dev->mfd_tscadc, adc_dev->buffer_en_ch_steps);
adc_dev->buffer_en_ch_steps = 0;
/* Flush FIFO of leftover data in the time it takes to disable adc */ /* Flush FIFO of leftover data in the time it takes to disable adc */
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
...@@ -491,6 +492,7 @@ static int tiadc_resume(struct device *dev) ...@@ -491,6 +492,7 @@ static int tiadc_resume(struct device *dev)
tiadc_writel(adc_dev, REG_CTRL, restore); tiadc_writel(adc_dev, REG_CTRL, restore);
tiadc_step_config(indio_dev); tiadc_step_config(indio_dev);
am335x_tsc_se_set(adc_dev->mfd_tscadc, adc_dev->buffer_en_ch_steps);
return 0; return 0;
} }
......
...@@ -309,7 +309,6 @@ static int tscadc_resume(struct device *dev) ...@@ -309,7 +309,6 @@ static int tscadc_resume(struct device *dev)
if (tscadc_dev->tsc_cell != -1) if (tscadc_dev->tsc_cell != -1)
tscadc_idle_config(tscadc_dev); tscadc_idle_config(tscadc_dev);
am335x_tsc_se_update(tscadc_dev);
restore = tscadc_readl(tscadc_dev, REG_CTRL); restore = tscadc_readl(tscadc_dev, REG_CTRL);
tscadc_writel(tscadc_dev, REG_CTRL, tscadc_writel(tscadc_dev, REG_CTRL,
(restore | CNTRLREG_TSCSSENB)); (restore | CNTRLREG_TSCSSENB));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册