diff options
author | Quentin Schulz <quentin.schulz@free-electrons.com> | 2016-11-23 17:11:50 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-11-24 18:19:02 +0300 |
commit | 1d2b2ac05ac6ea59b78e1e239180e69ce25cc85a (patch) | |
tree | 8233671663ef279a06fe6c02e2723d0b93f94d6e /drivers/gpio | |
parent | 1516c6350aa2770b8a5e36d40c3ec5078f92ba70 (diff) | |
download | linux-1d2b2ac05ac6ea59b78e1e239180e69ce25cc85a.tar.xz |
gpio: axp209: use correct register for GPIO input status
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-axp209.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-axp209.c b/drivers/gpio/gpio-axp209.c index d9c2a517c6df..4a346b7b4172 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; |