Commit e6852f86 authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Zheng Zengkai
Browse files

pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines

stable inclusion
from stable-v5.10.89
commit f5b02912e2dd89fe2386c19edd2c6f3e1296fc2b
bugzilla: 186140 https://gitee.com/openeuler/kernel/issues/I4S8HA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f5b02912e2dd89fe2386c19edd2c6f3e1296fc2b



--------------------------------

commit b67210cc upstream.

Consider the GPIO controller offset (from "gpio-ranges") to compute the
maximum GPIO line number.
This fixes an issue where gpio-ranges uses a non-null offset.
  e.g.: gpio-ranges = <&pinctrl 6 86 10>
        In that case the last valid GPIO line is not 9 but 15 (6 + 10 - 1)

Cc: stable@vger.kernel.org
Fixes: 67e2996f ("pinctrl: stm32: fix the reported number of GPIO lines per bank")
Reported-by: default avatarChristoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: default avatarFabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20211215095808.621716-1-fabien.dessenne@foss.st.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent fec8390f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment