2013-08-13 16:41:03

by Zubair Lutfullah :

[permalink] [raw]
Subject: [PATCH] mfd: ti_am335x_tscadc: fix reg_cache in clr function

Fixed reg_cache in the set function. But missed the clr function
in the previous patch. This updates the clr function as well.

This applies after the previous fix I sent that Lee has accepted.
mfd-next hasn't been updated yet.


Zubair Lutfullah (1):
mfd: ti_am335x_tscadc: Update reg_cache variable in clr function

drivers/mfd/ti_am335x_tscadc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--
1.7.9.5


2013-08-13 16:41:19

by Zubair Lutfullah :

[permalink] [raw]
Subject: [PATCH] mfd: ti_am335x_tscadc: Update reg_cache variable in clr function

The reg_cache variable should be updated with current
steps in the reg_se register. Then the mask should
apply and clear the register. Previously, the reg_cache
can be an old redundant value that isn't updated.

Signed-off-by: Zubair Lutfullah <[email protected]>
---
drivers/mfd/ti_am335x_tscadc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index 9f3f07a..baaf5a8 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -67,10 +67,10 @@ EXPORT_SYMBOL_GPL(am335x_tsc_se_set);
void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val)
{
spin_lock(&tsadc->reg_lock);
+ tsadc->reg_se_cache = tscadc_readl(tsadc, REG_SE);
tsadc->reg_se_cache &= ~val;
- spin_unlock(&tsadc->reg_lock);
-
am335x_tsc_se_update(tsadc);
+ spin_unlock(&tsadc->reg_lock);
}
EXPORT_SYMBOL_GPL(am335x_tsc_se_clr);

--
1.7.9.5

2013-08-13 17:16:53

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH] mfd: ti_am335x_tscadc: fix reg_cache in clr function

On Tue, 13 Aug 2013, Zubair Lutfullah wrote:

> Fixed reg_cache in the set function. But missed the clr function
> in the previous patch. This updates the clr function as well.
>
> This applies after the previous fix I sent that Lee has accepted.
> mfd-next hasn't been updated yet.
>
>
> Zubair Lutfullah (1):
> mfd: ti_am335x_tscadc: Update reg_cache variable in clr function
>
> drivers/mfd/ti_am335x_tscadc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

I assume this is a 0/1 patch.

When you're sending a single patch, there's no need to send a front
page. Also, when you do send one, it's helpful to name the patches:

[PATCH 0/2] ...
[PATCH 1/2] ...
[PATCH 2/2] ...
... etc

Where 0/2 is the front page.

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

2013-08-13 17:19:08

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH] mfd: ti_am335x_tscadc: Update reg_cache variable in clr function

On Tue, 13 Aug 2013, Zubair Lutfullah wrote:

> The reg_cache variable should be updated with current
> steps in the reg_se register. Then the mask should
> apply and clear the register. Previously, the reg_cache
> can be an old redundant value that isn't updated.
>
> Signed-off-by: Zubair Lutfullah <[email protected]>
> ---
> drivers/mfd/ti_am335x_tscadc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c

Applied, thanks.

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

2013-08-13 17:21:38

by Zubair Lutfullah :

[permalink] [raw]
Subject: Re: [PATCH] mfd: ti_am335x_tscadc: fix reg_cache in clr function

On Tue, Aug 13, 2013 at 06:16:44PM +0100, Lee Jones wrote:
>
> I assume this is a 0/1 patch.
Didn't realize send-mail doesn't like 0/1.
Noted.

Thanks
ZubairLK
>