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 <zubair.lutfullah@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
b018e1361b
commit
5d945d94a1
|
@ -67,10 +67,10 @@ EXPORT_SYMBOL_GPL(am335x_tsc_se_set);
|
||||||
void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val)
|
void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val)
|
||||||
{
|
{
|
||||||
spin_lock(&tsadc->reg_lock);
|
spin_lock(&tsadc->reg_lock);
|
||||||
|
tsadc->reg_se_cache = tscadc_readl(tsadc, REG_SE);
|
||||||
tsadc->reg_se_cache &= ~val;
|
tsadc->reg_se_cache &= ~val;
|
||||||
spin_unlock(&tsadc->reg_lock);
|
|
||||||
|
|
||||||
am335x_tsc_se_update(tsadc);
|
am335x_tsc_se_update(tsadc);
|
||||||
|
spin_unlock(&tsadc->reg_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(am335x_tsc_se_clr);
|
EXPORT_SYMBOL_GPL(am335x_tsc_se_clr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue