From: Viresh Kumar <viresh.kumar@st.com>
To: <grant.likely@secretlab.ca>, <linus.walleij@stericsson.com>,
<rabin@rab.in>
Cc: <linux-kernel@vger.kernel.org>, <armando.visconti@st.com>,
<shiraz.hashim@st.com>, <vipin.kumar@st.com>,
<rajeev-dlh.kumar@st.com>, <deepak.sikri@st.com>,
<vipulkumar.samar@st.com>, <amit.virdi@st.com>,
<viresh.kumar@st.com>, <pratyush.anand@st.com>,
<bhupesh.sharma@st.com>, <viresh.linux@gmail.com>,
<bhavna.yadav@st.com>, <vincenzo.frascino@st.com>,
<mirko.gardi@st.com>, <salvatore.dedominicis@st.com>
Subject: [PATCH Resend] gpio/gpio-stmpe: Fix the value returned by _get_value routine
Date: Mon, 27 Feb 2012 11:19:43 +0530 [thread overview]
Message-ID: <d913a7f72c71bbd4ebe76f1babe671376352cd6a.1330321682.git.viresh.kumar@st.com> (raw)
In-Reply-To: <2f2b55523b707d514a15d822ff812cfae654510a.1330079584.git.viresh.kumar@st.com>
From: Bhupesh Sharma <bhupesh.sharma@st.com>
The present _get_value routine returns the contents of the GPIO Monitor Pin
Status Register(GPMR) starting from the bit whose value is requested to BIT 0
(irrelevant bits are replace by 0).
For e.g. if we request the value of GPIO 6 in the earlier implementation the
value returned is:
BIT6 followed by 6 0's
whereas it should just return BIT6.
This patch addresses the same.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
---
Changes in Resend: Commit log fixed
drivers/gpio/gpio-stmpe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 094c5c4..dce3472 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -54,7 +54,7 @@ static int stmpe_gpio_get(struct gpio_chip *chip, unsigned offset)
if (ret < 0)
return ret;
- return ret & mask;
+ return !!(ret & mask);
}
static void stmpe_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
--
1.7.8.110.g4cb5d
prev parent reply other threads:[~2012-02-27 5:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 10:34 [PATCH] " Viresh Kumar
2012-02-24 14:15 ` Rabin Vincent
[not found] ` <CAOh2x=kDxqddm8EdRKp0+38Efs2QX33TtofLgLxe6auex0YZWQ@mail.gmail.com>
2012-02-24 14:42 ` Rabin Vincent
2012-02-27 5:49 ` Viresh Kumar [this message]
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=d913a7f72c71bbd4ebe76f1babe671376352cd6a.1330321682.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=amit.virdi@st.com \
--cc=armando.visconti@st.com \
--cc=bhavna.yadav@st.com \
--cc=bhupesh.sharma@st.com \
--cc=deepak.sikri@st.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mirko.gardi@st.com \
--cc=pratyush.anand@st.com \
--cc=rabin@rab.in \
--cc=rajeev-dlh.kumar@st.com \
--cc=salvatore.dedominicis@st.com \
--cc=shiraz.hashim@st.com \
--cc=vincenzo.frascino@st.com \
--cc=vipin.kumar@st.com \
--cc=vipulkumar.samar@st.com \
--cc=viresh.linux@gmail.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®