Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d2b2ac0 authored by Quentin Schulz's avatar Quentin Schulz Committed by Linus Walleij
Browse files

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: default avatarQuentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1516c635
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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;