All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: ti_am335x_tscadc: fix TSC resume
@ 2014-09-08 13:28 Sebastian Andrzej Siewior
  2014-09-08 14:37 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-09-08 13:28 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones; +Cc: linux-kernel

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: 7ca6740cd1cd ("mfd: input: iio: ti_amm335x: Rework TSC/ADCA
synchronization")
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/mfd/ti_am335x_tscadc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index e3076afe6b3c..e87a2485468f 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -58,7 +58,7 @@ void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val)
 	if (tsadc->adc_waiting)
 		wake_up(&tsadc->reg_se_wait);
 	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);
 }
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: ti_am335x_tscadc: fix TSC resume
  2014-09-08 13:28 [PATCH] mfd: ti_am335x_tscadc: fix TSC resume Sebastian Andrzej Siewior
@ 2014-09-08 14:37 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-09-08 14:37 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Samuel Ortiz, linux-kernel

On Mon, 08 Sep 2014, Sebastian Andrzej Siewior wrote:

> 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: 7ca6740cd1cd ("mfd: input: iio: ti_amm335x: Rework TSC/ADCA
> synchronization")
> Cc: stable@vger.kernel.org # v3.13+
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/mfd/ti_am335x_tscadc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
> index e3076afe6b3c..e87a2485468f 100644
> --- a/drivers/mfd/ti_am335x_tscadc.c
> +++ b/drivers/mfd/ti_am335x_tscadc.c
> @@ -58,7 +58,7 @@ void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val)
>  	if (tsadc->adc_waiting)
>  		wake_up(&tsadc->reg_se_wait);
>  	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);
>  }

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-08 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 13:28 [PATCH] mfd: ti_am335x_tscadc: fix TSC resume Sebastian Andrzej Siewior
2014-09-08 14:37 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.