Update pinctrl-stm32 driver to read gpio_offset from the devicetree and set it in gpiolib. This enables correct handling of GPIO banks on stm32mp151aad3, which have non-zero starting indices for some banks. Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- drivers/pinctrl/pinctrl-stm32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-stm32.c b/drivers/pinctrl/pinctrl-stm32.c index 63a01b6ec6..4a4b03ac0e 100644 --- a/drivers/pinctrl/pinctrl-stm32.c +++ b/drivers/pinctrl/pinctrl-stm32.c @@ -319,6 +319,7 @@ static int stm32_gpiochip_add(struct stm32_gpio_bank *bank, bank->base = IOMEM(iores->start); bank->chip.base = be32_to_cpu(gpio_ranges[PINCTRL_OFFSET]); + bank->chip.gpio_offset = be32_to_cpu(gpio_ranges[GPIOCTRL_OFFSET]); bank->chip.ops = &stm32_gpio_ops; bank->chip.dev = dev; -- 2.39.2