Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1528410
| From | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] gpio: axp209: use correct register for GPIO input status |
| Date | 2016-11-23 14:40 +0100 |
| Message-ID | <sGFWi-5vy-33@gated-at.bofh.it> (permalink) |
| References | <sGFWi-5vy-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] add support for AXP209 GPIOs functions Quentin Schulz <quentin.schulz@free-electrons.com> - 2016-11-23 14:40 +0100
[PATCH 1/2] gpio: axp209: use correct register for GPIO input status Quentin Schulz <quentin.schulz@free-electrons.com> - 2016-11-23 14:40 +0100
Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-11-23 14:50 +0100
Re: [PATCH 1/2] gpio: axp209: use correct register for GPIO input status Chen-Yu Tsai <wens@csie.org> - 2016-11-24 07:00 +0100
csiph-web