* [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip
@ 2025-05-27 11:13 Bartosz Golaszewski
2025-06-01 18:56 ` Linus Walleij
2025-06-10 9:41 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-05-27 11:13 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Currently for CONFIG_GPIO_GENERIC=y each struct gpio_chip object
contains the fields relevant only for gpio-mmio users. It's not an
insignificant number either as it's several pointers and integers.
It makes sense to remove these fields from struct gpio_chip into a
dedicated structure but this is not trivial due to how the bgpio_init()
function is implemented.
Add a task for tracking this rework.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/TODO | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
index 4a8b349f2483a..ef53892cb44d7 100644
--- a/drivers/gpio/TODO
+++ b/drivers/gpio/TODO
@@ -131,6 +131,11 @@ Work items:
helpers (x86 inb()/outb()) and convert port-mapped I/O drivers to use
this with dry-coding and sending to maintainers to test
+- Move the MMIO GPIO specific fields out of struct gpio_chip into a
+ dedicated structure. Currently every GPIO chip has them if gpio-mmio is
+ enabled in Kconfig even if it itself doesn't register with the helper
+ library.
+
-------------------------------------------------------------------------------
Generic regmap GPIO
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip
2025-05-27 11:13 [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip Bartosz Golaszewski
@ 2025-06-01 18:56 ` Linus Walleij
2025-06-10 9:41 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2025-06-01 18:56 UTC (permalink / raw)
To: Bartosz Golaszewski; +Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
On Tue, May 27, 2025 at 1:14 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Currently for CONFIG_GPIO_GENERIC=y each struct gpio_chip object
> contains the fields relevant only for gpio-mmio users. It's not an
> insignificant number either as it's several pointers and integers.
>
> It makes sense to remove these fields from struct gpio_chip into a
> dedicated structure but this is not trivial due to how the bgpio_init()
> function is implemented.
>
> Add a task for tracking this rework.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
That's a good TODO.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip
2025-05-27 11:13 [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip Bartosz Golaszewski
2025-06-01 18:56 ` Linus Walleij
@ 2025-06-10 9:41 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 9:41 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Tue, 27 May 2025 13:13:53 +0200, Bartosz Golaszewski wrote:
> Currently for CONFIG_GPIO_GENERIC=y each struct gpio_chip object
> contains the fields relevant only for gpio-mmio users. It's not an
> insignificant number either as it's several pointers and integers.
>
> It makes sense to remove these fields from struct gpio_chip into a
> dedicated structure but this is not trivial due to how the bgpio_init()
> function is implemented.
>
> [...]
Applied, thanks!
[1/1] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip
https://git.kernel.org/brgl/linux/c/97a7ea2b8f4a9aec1f43435658343e046c2a4983
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-10 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 11:13 [PATCH] gpio: TODO: add a task for removing MMIO-specific fields from gpio_chip Bartosz Golaszewski
2025-06-01 18:56 ` Linus Walleij
2025-06-10 9:41 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).