From: Quentin Schulz <quentin.schulz@free-electrons.com>
To: linus.walleij@linaro.org, gnurou@gmail.com, robh+dt@kernel.org,
mark.rutland@arm.com, wens@csie.org
Cc: Quentin Schulz <quentin.schulz@free-electrons.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
thomas.petazzoni@free-electrons.com
Subject: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status
Date: Wed, 23 Nov 2016 14:27:48 +0100 [thread overview]
Message-ID: <20161123132749.11666-2-quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <20161123132749.11666-1-quentin.schulz@free-electrons.com>
The GPIO input status was read from control register
(AXP20X_GPIO[210]_CTRL) instead of status register (AXP20X_GPIO20_SS).
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---
drivers/gpio/gpio-axp209.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-axp209.c b/drivers/gpio/gpio-axp209.c
index d9c2a51..4a346b7 100644
--- a/drivers/gpio/gpio-axp209.c
+++ b/drivers/gpio/gpio-axp209.c
@@ -64,13 +64,9 @@ static int axp20x_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct axp20x_gpio *gpio = gpiochip_get_data(chip);
unsigned int val;
- int reg, ret;
-
- reg = axp20x_gpio_get_reg(offset);
- if (reg < 0)
- return reg;
+ int ret;
- ret = regmap_read(gpio->regmap, reg, &val);
+ ret = regmap_read(gpio->regmap, AXP20X_GPIO20_SS, &val);
if (ret)
return ret;
--
2.9.3
next prev parent reply other threads:[~2016-11-23 13:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 13:27 [PATCH 0/2] add support for AXP209 GPIOs functions Quentin Schulz
2016-11-23 13:27 ` Quentin Schulz [this message]
2016-11-23 13:45 ` [PATCH 1/2] gpio: axp209: use correct register for GPIO input status Thomas Petazzoni
2016-11-24 5:52 ` Chen-Yu Tsai
2016-11-23 13:27 ` [PATCH 2/2] gpio: axp209: add pinctrl support Quentin Schulz
2016-11-23 13:45 ` Thomas Petazzoni
2016-11-23 17:13 ` kbuild test robot
2016-11-23 17:21 ` kbuild test robot
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=20161123132749.11666-2-quentin.schulz@free-electrons.com \
--to=quentin.schulz@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=wens@csie.org \
/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®