From: Zubair Lutfullah <zubair.lutfullah@gmail.com>
To: sameo@linux.intel.com, lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: [PATCH] mfd: ti_am335x_tscadc: Update reg_cache variable in clr function
Date: Tue, 13 Aug 2013 17:40:56 +0100 [thread overview]
Message-ID: <1376412056-20736-2-git-send-email-zubair.lutfullah@gmail.com> (raw)
In-Reply-To: <1376412056-20736-1-git-send-email-zubair.lutfullah@gmail.com>
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>
---
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
next prev parent reply other threads:[~2013-08-13 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 16:40 [PATCH] mfd: ti_am335x_tscadc: fix reg_cache " Zubair Lutfullah
2013-08-13 16:40 ` Zubair Lutfullah [this message]
2013-08-13 17:18 ` [PATCH] mfd: ti_am335x_tscadc: Update reg_cache variable " Lee Jones
2013-08-13 17:16 ` [PATCH] mfd: ti_am335x_tscadc: fix reg_cache " Lee Jones
2013-08-13 17:21 ` Zubair Lutfullah :
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376412056-20736-2-git-send-email-zubair.lutfullah@gmail.com \
--to=zubair.lutfullah@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®