]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: move gpio-mmio-specific fields out of struct gpio_chip
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 10 Sep 2025 07:12:51 +0000 (09:12 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 12 Sep 2025 07:22:45 +0000 (09:22 +0200)
commit9b90afa6d613b66ec4e74ae75f9bfa5baf386ecd
treeb3d02b6530a2645c7e9f2fcb9fa3ff81fa2f7450
parente43e94fa19cf058c4e465fcdbc2f521123058ea6
gpio: move gpio-mmio-specific fields out of struct gpio_chip

With all users of bgpio_init() converted to using the modernized generic
GPIO chip API, we can now move the gpio-mmio-specific fields out of
struct gpio_chip and into the dedicated struct gpio_generic_chip. To
that end: adjust the gpio-mmio driver to the new layout, update the
docs, etc.

The changes in gpio-mlxbf2.c and gpio-mpc8xxx.c are here and not in their
respective conversion commits because the former passes the address of
the generic chip's lock to the __releases() annotation and we cannot
really hide it while gpio-mpc8xxx.c accesses the shadow registers in a
driver-specific workaround and there's no reason to make them available
in a public API.

Also: drop the relevant task from TODO as it's now done.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-15-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/TODO
drivers/gpio/gpio-mlxbf2.c
drivers/gpio/gpio-mmio.c
drivers/gpio/gpio-mpc8xxx.c
include/linux/gpio/driver.h
include/linux/gpio/generic.h