Skip to content

Commit f9315f1

Browse files
author
Bartosz Golaszewski
committed
gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
pinctrl_gpio_set_config() expects the GPIO number from the global GPIO numberspace, not the controller-relative offset, which needs to be added to the chip base. Fixes: 5ae4cb9 ("gpio: aspeed: Add debounce support") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
1 parent f057511 commit f9315f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-aspeed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
973973
else if (param == PIN_CONFIG_BIAS_DISABLE ||
974974
param == PIN_CONFIG_BIAS_PULL_DOWN ||
975975
param == PIN_CONFIG_DRIVE_STRENGTH)
976-
return pinctrl_gpio_set_config(offset, config);
976+
return pinctrl_gpio_set_config(chip->base + offset, config);
977977
else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN ||
978978
param == PIN_CONFIG_DRIVE_OPEN_SOURCE)
979979
/* Return -ENOTSUPP to trigger emulation, as per datasheet */

0 commit comments

Comments
 (0)