[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250702-gpio-mmio-rework-v2-0-6b77aab684d8@linaro.org>
Date: Wed, 02 Jul 2025 11:22:07 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH v2 0/8] gpio: move generic GPIO chip fields out of the
top-level gpio_chip struct
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@...aro.org>
---
Changes in v2:
- rebase on top of recent driver changes
- pick up review tags
- Link to v1: https://lore.kernel.org/r/20250624-gpio-mmio-rework-v1-0-aea12209d258@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 | 27 ++++++----
drivers/gpio/gpio-en7523.c | 36 ++++++-------
drivers/gpio/gpio-mxc.c | 87 +++++++++++++++---------------
include/linux/gpio/generic.h | 120 ++++++++++++++++++++++++++++++++++++++++++
6 files changed, 243 insertions(+), 119 deletions(-)
---
base-commit: 3f804361f3b9af33e00b90ec9cb5afcc96831e60
change-id: 20250606-gpio-mmio-rework-a2f4c439aa96
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Powered by blists - more mailing lists