]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: mmio: add BGPIOF_NO_INPUT flag for GPO gpiochip
authorClément Le Goffic <clement.legoffic@foss.st.com>
Fri, 13 Jun 2025 10:14:12 +0000 (12:14 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 19 Jun 2025 07:05:33 +0000 (09:05 +0200)
commitdeefc7083414de81aad102b60f0390f600d7eb79
tree3ab62240d9323708853465807e1fc727879ee13c
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
gpio: mmio: add BGPIOF_NO_INPUT flag for GPO gpiochip

When using bgpio_init with a gpiochip acting as a GPO (output only), the
gpiochip ops `direction_input` was set to `bgpio_simple_dir_in` by
default but we have no input ability.

Adding this flag allows to set a valid ops for the `direction_output`
ops without setting a valid ops for `direction_input` by default.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Link: https://lore.kernel.org/r/20250613-hdp-upstream-v5-1-6fd6f0dc527c@foss.st.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-mmio.c
include/linux/gpio/driver.h