From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH v2 00/62] pinctrl: don't use GPIOLIB global numberspace in helpers
Date: Wed, 11 Oct 2023 14:07:28 +0200 [thread overview]
Message-ID: <20231011120830.49324-1-brgl@bgdev.pl> (raw)
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
We have a set of pinctrl helpers for GPIOLIB drivers that take a number
from the global GPIO numberspace as argument. We are trying to get rid
of this global numbering. Let's rework these helpers to use the
recommended gpio_chip + controller-relative offset instead.
This work is split into phases: first let's introduce the new variants
of the helpers. Next: let's convert all users one-by-one for easier
review. After that let's remove the old helpers and rename the new
variants to take the place of the old ones. Finally convert static
functions in pinctrl/core.c to using the same signature and to top it
off, let's remove now redundant wrappers around the pinctrl_helpers.
This series introduces no functional changes in drivers so I decided to
not spam every single driver maintainer anymore.
v1 -> v2:
- drop the conversion to using cleanup.h helpers as this is not the
subject of this series
- split the patch renaming the new variants to the old names into
several patches that perform the operation step by step for easier
review
- collect review tags and acks
- add follow-up patches that drop the wrappers around pinctrl helpers
where applicable (where all the wrappers do is call the helper)
- fix build error with PINCTRL disabled
Bartosz Golaszewski (62):
pinctrl: remove unneeded extern specifiers from consumer.h
pinctrl: provide new GPIO-to-pinctrl glue helpers
gpiolib: generic: use new pinctrl GPIO helpers
gpio: cdev: use pinctrl_gpio_can_use_line_new()
gpio: rcar: use new pinctrl GPIO helpers
gpio: tegra: use new pinctrl GPIO helpers
gpio: em: use new pinctrl GPIO helpers
gpio: aspeed: use new pinctrl GPIO helpers
gpio: mvebu: use new pinctrl GPIO helpers
gpio: pxa: use new pinctrl GPIO helpers
gpio: rockchip: use new pinctrl GPIO helpers
gpio: vf610: use new pinctrl GPIO helpers
pinctrl: nuvoton: use new pinctrl GPIO helpers
pinctrl: renesas: use new pinctrl GPIO helpers
pinctrl: bcm: use new pinctrl GPIO helpers
pinctrl: stm32: use new pinctrl GPIO helpers
pinctrl: spear: use new pinctrl GPIO helpers
pinctrl: starfive: use new pinctrl GPIO helpers
pinctrl: ocelot: use new pinctrl GPIO helpers
pinctrl: rk805: use new pinctrl GPIO helpers
pinctrl: cirrus: use new pinctrl GPIO helpers
pinctrl: mediatek: use new pinctrl GPIO helpers
pinctrl: axp209: use new pinctrl GPIO helpers
pinctrl: vt8500: use new pinctrl GPIO helpers
pinctrl: cy8c95x0: use new pinctrl GPIO helpers
pinctrl: as3722: use new pinctrl GPIO helpers
pinctrl: ingenic: use new pinctrl GPIO helpers
pinctrl: intel: use new pinctrl GPIO helpers
pinctrl: st: use new pinctrl GPIO helpers
pinctrl: remove pinctrl_gpio_can_use_line()
pinctrl: remove pinctrl_gpio_request()
pinctrl: remove pinctrl_gpio_free()
pinctrl: remove pinctrl_gpio_direction_input()
pinctrl: remove pinctrl_gpio_direction_output()
pinctrl: remove pinctrl_gpio_set_config()
treewide: rename pinctrl_gpio_can_use_line_new()
treewide: rename pinctrl_gpio_request_new()
treewide: rename pinctrl_gpio_free_new()
treewide: rename pinctrl_gpio_direction_input_new()
treewide: rename pinctrl_gpio_direction_output_new()
treewide: rename pinctrl_gpio_set_config_new()
pinctrl: change the signature of pinctrl_gpio_direction()
pinctrl: change the signature of pinctrl_get_device_gpio_range()
pinctrl: change the signature of pinctrl_match_gpio_range()
pinctrl: change the signature of gpio_to_pin()
pinctrl: change the signature of pinctrl_ready_for_gpio_range()
pinctrl: intel: drop the wrappers around
pinctrl_gpio_direction_input()
pinctrl: st: drop the wrapper around pinctrl_gpio_direction_input()
pinctrl: ingenic: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: as3722: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: cy8c95x0: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: vt8500: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: axp209: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: rk805: drop the wrapper around pinctrl_gpio_direction_input()
pinctrl: mediatek: drop the wrappers around
pinctrl_gpio_direction_input()
pinctrl: cirrus: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: ocelot: drop the wrapper around
pinctrl_gpio_direction_input()
pinctrl: starfive: drop wrappers around pinctrl_gpio_request/free()
pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input()
pinctrl: nuvoton: drop wrappers around pinctrl_gpio_request/free()
pinctrl: em: drop the wrapper around pinctrl_gpio_request()
pinctrl: tegra: drop the wrapper around pinctrl_gpio_request()
drivers/gpio/gpio-aspeed.c | 6 +-
drivers/gpio/gpio-em.c | 9 +-
drivers/gpio/gpio-mvebu.c | 4 +-
drivers/gpio/gpio-pxa.c | 4 +-
drivers/gpio/gpio-rcar.c | 4 +-
drivers/gpio/gpio-rockchip.c | 4 +-
drivers/gpio/gpio-tegra.c | 13 +-
drivers/gpio/gpio-vf610.c | 4 +-
drivers/gpio/gpiolib-cdev.c | 3 +-
drivers/gpio/gpiolib.c | 6 +-
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 +-
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 9 +-
drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 2 +-
drivers/pinctrl/core.c | 133 ++++++++++--------
drivers/pinctrl/intel/pinctrl-cherryview.c | 9 +-
drivers/pinctrl/intel/pinctrl-intel.c | 9 +-
drivers/pinctrl/intel/pinctrl-lynxpoint.c | 9 +-
drivers/pinctrl/mediatek/pinctrl-moore.c | 9 +-
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 10 +-
drivers/pinctrl/mediatek/pinctrl-paris.c | 4 +-
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 14 +-
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 13 +-
drivers/pinctrl/pinctrl-as3722.c | 9 +-
drivers/pinctrl/pinctrl-axp209.c | 7 +-
drivers/pinctrl/pinctrl-cy8c95x0.c | 9 +-
drivers/pinctrl/pinctrl-ingenic.c | 19 ++-
drivers/pinctrl/pinctrl-ocelot.c | 10 +-
drivers/pinctrl/pinctrl-rk805.c | 10 +-
drivers/pinctrl/pinctrl-st.c | 11 +-
drivers/pinctrl/renesas/gpio.c | 8 +-
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 +-
drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 +-
drivers/pinctrl/spear/pinctrl-plgpio.c | 8 +-
.../starfive/pinctrl-starfive-jh7100.c | 14 +-
.../starfive/pinctrl-starfive-jh7110.c | 14 +-
drivers/pinctrl/stm32/pinctrl-stm32.c | 20 +--
drivers/pinctrl/vt8500/pinctrl-wmt.c | 9 +-
include/linux/pinctrl/consumer.h | 74 +++++++---
38 files changed, 218 insertions(+), 296 deletions(-)
--
2.39.2
next reply other threads:[~2023-10-11 12:09 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 12:07 Bartosz Golaszewski [this message]
2023-10-11 12:07 ` [PATCH v2 01/62] pinctrl: remove unneeded extern specifiers from consumer.h Bartosz Golaszewski
2023-10-11 16:44 ` Andy Shevchenko
2023-10-11 12:07 ` [PATCH v2 02/62] pinctrl: provide new GPIO-to-pinctrl glue helpers Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 03/62] gpiolib: generic: use new pinctrl GPIO helpers Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 04/62] gpio: cdev: use pinctrl_gpio_can_use_line_new() Bartosz Golaszewski
2023-10-11 16:58 ` Andy Shevchenko
2023-10-11 12:07 ` [PATCH v2 05/62] gpio: rcar: use new pinctrl GPIO helpers Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 06/62] gpio: tegra: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 07/62] gpio: em: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 08/62] gpio: aspeed: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 09/62] gpio: mvebu: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 10/62] gpio: pxa: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 11/62] gpio: rockchip: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 12/62] gpio: vf610: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 13/62] pinctrl: nuvoton: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 14/62] pinctrl: renesas: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 15/62] pinctrl: bcm: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 16/62] pinctrl: stm32: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 17/62] pinctrl: spear: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 18/62] pinctrl: starfive: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 19/62] pinctrl: ocelot: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 20/62] pinctrl: rk805: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 21/62] pinctrl: cirrus: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 22/62] pinctrl: mediatek: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 23/62] pinctrl: axp209: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 24/62] pinctrl: vt8500: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 25/62] pinctrl: cy8c95x0: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 26/62] pinctrl: as3722: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 27/62] pinctrl: ingenic: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 28/62] pinctrl: intel: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 29/62] pinctrl: st: " Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 30/62] pinctrl: remove pinctrl_gpio_can_use_line() Bartosz Golaszewski
2023-10-11 12:07 ` [PATCH v2 31/62] pinctrl: remove pinctrl_gpio_request() Bartosz Golaszewski
2023-10-11 16:54 ` Andy Shevchenko
2023-10-12 19:43 ` Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 32/62] pinctrl: remove pinctrl_gpio_free() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 33/62] pinctrl: remove pinctrl_gpio_direction_input() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 34/62] pinctrl: remove pinctrl_gpio_direction_output() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 35/62] pinctrl: remove pinctrl_gpio_set_config() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 36/62] treewide: rename pinctrl_gpio_can_use_line_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 37/62] treewide: rename pinctrl_gpio_request_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 38/62] treewide: rename pinctrl_gpio_free_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 39/62] treewide: rename pinctrl_gpio_direction_input_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 40/62] treewide: rename pinctrl_gpio_direction_output_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 41/62] treewide: rename pinctrl_gpio_set_config_new() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 42/62] pinctrl: change the signature of pinctrl_gpio_direction() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 43/62] pinctrl: change the signature of pinctrl_get_device_gpio_range() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 44/62] pinctrl: change the signature of pinctrl_match_gpio_range() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 45/62] pinctrl: change the signature of gpio_to_pin() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 46/62] pinctrl: change the signature of pinctrl_ready_for_gpio_range() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 47/62] pinctrl: intel: drop the wrappers around pinctrl_gpio_direction_input() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 48/62] pinctrl: st: drop the wrapper " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 49/62] pinctrl: ingenic: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 50/62] pinctrl: as3722: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 51/62] pinctrl: cy8c95x0: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 52/62] pinctrl: vt8500: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 53/62] pinctrl: axp209: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 54/62] pinctrl: rk805: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 55/62] pinctrl: mediatek: drop the wrappers " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 56/62] pinctrl: cirrus: drop the wrapper " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 57/62] pinctrl: ocelot: " Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 58/62] pinctrl: starfive: drop wrappers around pinctrl_gpio_request/free() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 59/62] pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 60/62] pinctrl: nuvoton: drop wrappers around pinctrl_gpio_request/free() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 61/62] pinctrl: em: drop the wrapper around pinctrl_gpio_request() Bartosz Golaszewski
2023-10-11 12:08 ` [PATCH v2 62/62] pinctrl: tegra: " Bartosz Golaszewski
2023-10-11 17:04 ` [PATCH v2 00/62] pinctrl: don't use GPIOLIB global numberspace in helpers Andy Shevchenko
2023-10-12 7:08 ` Linus Walleij
2023-10-12 13:23 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231011120830.49324-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).