Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Quentin Schulz and committed by
Linus Walleij
1d2b2ac0 1516c635

+2 -6
+2 -6
drivers/gpio/gpio-axp209.c
··· 64 64 { 65 65 struct axp20x_gpio *gpio = gpiochip_get_data(chip); 66 66 unsigned int val; 67 - int reg, ret; 67 + int ret; 68 68 69 - reg = axp20x_gpio_get_reg(offset); 70 - if (reg < 0) 71 - return reg; 72 - 73 - ret = regmap_read(gpio->regmap, reg, &val); 69 + ret = regmap_read(gpio->regmap, AXP20X_GPIO20_SS, &val); 74 70 if (ret) 75 71 return ret; 76 72