Commit 6a71f38d authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Lee Jones

mfd: ti_am335x_tscadc: Fix TSC resume

In the resume path, the ADC invokes am335x_tsc_se_set_cache() with 0 as
the steps argument if continous mode is not in use. This in turn disables
all steps and so the TSC is not working until one ADC sampling is
performed.

This patch fixes it by writing the current cached mask instead of the
passed steps.

Fixes: 7ca6740c ("mfd: input: iio: ti_amm335x: Rework TSC/ADCA
synchronization")
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 0b496b4c
...@@ -57,7 +57,7 @@ void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val) ...@@ -57,7 +57,7 @@ void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val)
if (tsadc->adc_waiting) if (tsadc->adc_waiting)
wake_up(&tsadc->reg_se_wait); wake_up(&tsadc->reg_se_wait);
else if (!tsadc->adc_in_use) else if (!tsadc->adc_in_use)
tscadc_writel(tsadc, REG_SE, val); tscadc_writel(tsadc, REG_SE, tsadc->reg_se_cache);
spin_unlock_irqrestore(&tsadc->reg_lock, flags); spin_unlock_irqrestore(&tsadc->reg_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment