Skip to content

Commit 9b90afa

Browse files
author
Bartosz Golaszewski
committed
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>
1 parent e43e94f commit 9b90afa

6 files changed

Lines changed: 211 additions & 233 deletions

File tree

drivers/gpio/TODO

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ Work items:
131131
helpers (x86 inb()/outb()) and convert port-mapped I/O drivers to use
132132
this with dry-coding and sending to maintainers to test
133133

134-
- Move the MMIO GPIO specific fields out of struct gpio_chip into a
135-
dedicated structure. Currently every GPIO chip has them if gpio-mmio is
136-
enabled in Kconfig even if it itself doesn't register with the helper
137-
library.
138-
139134
-------------------------------------------------------------------------------
140135

141136
Generic regmap GPIO

drivers/gpio/gpio-mlxbf2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int mlxbf2_gpio_lock_acquire(struct mlxbf2_gpio_context *gs)
156156
* Release the YU arm_gpio_lock after changing the direction mode.
157157
*/
158158
static void mlxbf2_gpio_lock_release(struct mlxbf2_gpio_context *gs)
159-
__releases(&gs->chip.gc.bgpio_lock)
159+
__releases(&gs->chip.lock)
160160
__releases(yu_arm_gpio_lock_param.lock)
161161
{
162162
writel(YU_ARM_GPIO_LOCK_RELEASE, yu_arm_gpio_lock_param.io);

0 commit comments

Comments
 (0)