linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] gpio: move generic GPIO chip fields out of the top-level gpio_chip struct
@ 2025-06-24 13:27 Bartosz Golaszewski
  2025-06-24 13:27 ` [PATCH 1/8] gpio: generic: add new generic GPIO chip API Bartosz Golaszewski
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2025-06-24 13:27 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: linux-kernel, linux-gpio, imx, linux-arm-kernel,
	Bartosz Golaszewski

The conversion of GPIO drivers to using the new line value setters is
moving nicely along and we're on track to have all the existing
providers converted upstream after the next merge window. There's
another piece of technical debt that bothers me - the fact that struct
gpio_chip contains a bunch of fields that are only relevant to the
generic GPIO chip implementation from gpio-mmio.c.

Let's work towards moving them out of struct gpio_chip and into their
own struct gpio_generic_chip. Doing this in a single series would
require some ~40 commits which is way too many to review at a time.
There are also users of gpio-mmio under drivers/pinctrl/ and
drivers/mfd/ which would require cross-subsystem merges. I think it's
better to do this in stages over 3 release cycles. This series adds a
new API for gpio-mmio users, hiding the implementation details and
converts the first set of GPIO drivers. Once upstream, we'll convert all
remaining users and once that's done, we'll move all the
gpio-mmio-specific fields to the new structure, convert the internals to
using them and remove bgpio_init(). The last step will be done in a
backward-compatible way, not affecting the users.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (8):
      gpio: generic: add new generic GPIO chip API
      gpio: mxc: use lock guards for the generic GPIO chip lock
      gpio: mxc: use new generic GPIO chip API
      gpio: clps711x: use new generic GPIO chip API
      gpio: cadence: use lock guards
      gpio: cadence: use new generic GPIO chip API
      gpio: 74xx-mmio: use new generic GPIO chip API
      gpio: en7523: use new generic GPIO chip API

 drivers/gpio/gpio-74xx-mmio.c |  32 +++++------
 drivers/gpio/gpio-cadence.c   |  60 ++++++++++-----------
 drivers/gpio/gpio-clps711x.c  |  29 +++++-----
 drivers/gpio/gpio-en7523.c    |  36 ++++++-------
 drivers/gpio/gpio-mxc.c       |  87 +++++++++++++++---------------
 include/linux/gpio/generic.h  | 120 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 244 insertions(+), 120 deletions(-)
---
base-commit: cb908f3699fb137e28017a8fdf506c35762b3eb6
change-id: 20250606-gpio-mmio-rework-a2f4c439aa96

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-24 19:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 13:27 [PATCH 0/8] gpio: move generic GPIO chip fields out of the top-level gpio_chip struct Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 1/8] gpio: generic: add new generic GPIO chip API Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 2/8] gpio: mxc: use lock guards for the generic GPIO chip lock Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 3/8] gpio: mxc: use new generic GPIO chip API Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 4/8] gpio: clps711x: " Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 5/8] gpio: cadence: use lock guards Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 6/8] gpio: cadence: use new generic GPIO chip API Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 7/8] gpio: 74xx-mmio: " Bartosz Golaszewski
2025-06-24 13:27 ` [PATCH 8/8] gpio: en7523: " Bartosz Golaszewski
2025-06-24 19:51 ` [PATCH 0/8] gpio: move generic GPIO chip fields out of the top-level gpio_chip struct Linus Walleij

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).