pinctrl: stm32: fix the reported number of GPIO lines per bank
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Thu, 17 Jun 2021 14:46:29 +0000 (16:46 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:24 +0000 (08:47 -0400)
commit018d03fcf77a7e6a37503397f871095f7fd909ec
tree4fe59cb1b3ea5eef405c98ebf6214f1ba31098e3
parentdf654cd3d3001917ba18c0e5445a9ab8e9240f1e
pinctrl: stm32: fix the reported number of GPIO lines per bank

[ Upstream commit 67e2996f72c71ebe4ac2fcbcf77e54479bb7aa11 ]

Each GPIO bank supports a variable number of lines which is usually 16, but
is less in some cases : this is specified by the last argument of the
"gpio-ranges" bank node property.
Report to the framework, the actual number of lines, so the libgpiod
gpioinfo command lists the actually existing GPIO lines.

Fixes: 1dc9d289154b ("pinctrl: stm32: add possibility to use gpio-ranges to declare bank range")
Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20210617144629.2557693-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/stm32/pinctrl-stm32.c