]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: regmap: add the .fixed_direction_output configuration parameter
authorIoana Ciornei <ioana.ciornei@nxp.com>
Sun, 26 Oct 2025 16:25:27 +0000 (12:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:10:32 +0000 (14:10 +0100)
commitccd39d972545189a8fa430b2b695f659bc2aebd3
tree246ce0677fc1268dd36baa28dc923f1a494db983
parent2325e4473cb1dcdedfe37ac436c04f5c7f330a07
gpio: regmap: add the .fixed_direction_output configuration parameter

[ Upstream commit 00aaae60faf554c27c95e93d47f200a93ff266ef ]

There are GPIO controllers such as the one present in the LX2160ARDB
QIXIS FPGA which have fixed-direction input and output GPIO lines mixed
together in a single register. This cannot be modeled using the
gpio-regmap as-is since there is no way to present the true direction of
a GPIO line.

In order to make this use case possible, add a new configuration
parameter - fixed_direction_output - into the gpio_regmap_config
structure. This will enable user drivers to provide a bitmap that
represents the fixed direction of the GPIO lines.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Stable-dep-of: 2ba5772e530f ("gpio: idio-16: Define fixed direction of the GPIO lines")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-regmap.c
include/linux/gpio/regmap.h