Skip to content

pinctrl: don't use GPIOLIB global numberspace in helpers

Bartosz Golaszewski linux-gpio lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest73 patches 13 repliesIn review
  2. v262 patches 7 repliesSuperseded
  3. v136 patches 39 repliesSuperseded 1 of 36 applied

Changes in v3 from the cover letter

- split patches modifying multiple drivers at once into separate changesets
- fix build errors reported by autobuilders

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/73pinctrl: remove unneeded extern specifiers from consumer.hinclude/linux/pinctrl/consumer.h+17 -170 replies
2/73pinctrl: provide new GPIO-to-pinctrl glue helpersdrivers/pinctrl/core.c include/linux/pinctrl/consumer.h+125 -290 replies
3/73gpiolib: generic: use new pinctrl GPIO helpersdrivers/gpio/gpiolib.c+3 -30 replies
4/73gpio: cdev: use pinctrl_gpio_can_use_line_new()drivers/gpio/gpiolib-cdev.c+1 -20 replies
5/73gpio: rcar: use new pinctrl GPIO helpersdrivers/gpio/gpio-rcar.c+2 -20 replies
6/73gpio: tegra: use new pinctrl GPIO helpersdrivers/gpio/gpio-tegra.c+4 -40 replies
7/73gpio: em: use new pinctrl GPIO helpersdrivers/gpio/gpio-em.c+2 -20 replies
8/73gpio: aspeed: use new pinctrl GPIO helpersdrivers/gpio/gpio-aspeed.c+3 -30 replies
9/73gpio: mvebu: use new pinctrl GPIO helpersdrivers/gpio/gpio-mvebu.c+2 -20 replies
10/73gpio: pxa: use new pinctrl GPIO helpersdrivers/gpio/gpio-pxa.c+2 -20 replies
11/73gpio: rockchip: use new pinctrl GPIO helpersdrivers/gpio/gpio-rockchip.c+2 -20 replies
12/73gpio: vf610: use new pinctrl GPIO helpersdrivers/gpio/gpio-vf610.c+2 -20 replies
13/73pinctrl: nuvoton: npcm7xx: use new pinctrl GPIO helpersdrivers/pinctrl/nuvoton/pinctrl-npcm7xx.c+4 -40 replies
14/73pinctrl: nuvoton: npcm8xx: use new pinctrl GPIO helpersdrivers/pinctrl/nuvoton/pinctrl-npcm8xx.c+4 -40 replies
15/73pinctrl: renesas: use new pinctrl GPIO helpersdrivers/pinctrl/renesas/gpio.c drivers/pinctrl/renesas/pinctrl-rzg2l.c drivers/pinctrl/renesas/pinctrl-rzv2m.c+8 -80 replies
16/73pinctrl: bcm: use new pinctrl GPIO helpersdrivers/pinctrl/bcm/pinctrl-iproc-gpio.c+2 -40 replies
17/73pinctrl: stm32: use new pinctrl GPIO helpersdrivers/pinctrl/stm32/pinctrl-stm32.c+4 -40 replies
18/73pinctrl: spear: use new pinctrl GPIO helpersdrivers/pinctrl/spear/pinctrl-plgpio.c+3 -50 replies
19/73pinctrl: starfive: jh7100: use new pinctrl GPIO helpersdrivers/pinctrl/starfive/pinctrl-starfive-jh7100.c+2 -20 replies
20/73pinctrl: starfive: jh7110: use new pinctrl GPIO helpersdrivers/pinctrl/starfive/pinctrl-starfive-jh7110.c+2 -20 replies
21/73pinctrl: ocelot: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-ocelot.c+2 -20 replies
22/73pinctrl: rk805: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-rk805.c+2 -20 replies
23/73pinctrl: cirrus: use new pinctrl GPIO helpersdrivers/pinctrl/cirrus/pinctrl-cs42l43.c drivers/pinctrl/cirrus/pinctrl-lochnagar.c+3 -30 replies
24/73pinctrl: mediatek: moore: use new pinctrl GPIO helpersdrivers/pinctrl/mediatek/pinctrl-moore.c+2 -20 replies
25/73pinctrl: mediatek: common: use new pinctrl GPIO helpersdrivers/pinctrl/mediatek/pinctrl-mtk-common.c+2 -20 replies
26/73pinctrl: mediatek: paris: use new pinctrl GPIO helpersdrivers/pinctrl/mediatek/pinctrl-paris.c+2 -20 replies
27/73pinctrl: axp209: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-axp209.c+1 -10 replies
28/73pinctrl: vt8500: use new pinctrl GPIO helpersdrivers/pinctrl/vt8500/pinctrl-wmt.c+2 -20 replies
29/73pinctrl: cy8c95x0: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-cy8c95x0.c+2 -20 replies
30/73pinctrl: as3722: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-as3722.c+2 -20 replies
31/73pinctrl: ingenic: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-ingenic.c+8 -30 replies
32/73pinctrl: intel: cherryview: use new pinctrl GPIO helpersdrivers/pinctrl/intel/pinctrl-cherryview.c+2 -21 reply
33/73pinctrl: intel: use new pinctrl GPIO helpersdrivers/pinctrl/intel/pinctrl-intel.c+2 -20 replies
34/73pinctrl: intel: lynxpoint: use new pinctrl GPIO helpersdrivers/pinctrl/intel/pinctrl-lynxpoint.c+2 -21 reply
35/73pinctrl: st: use new pinctrl GPIO helpersdrivers/pinctrl/pinctrl-st.c+2 -20 replies
36/73pinctrl: remove pinctrl_gpio_can_use_line()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+3 -150 replies
37/73pinctrl: remove pinctrl_gpio_request()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+22 -350 replies
38/73pinctrl: remove pinctrl_gpio_free()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+17 -290 replies
39/73pinctrl: remove pinctrl_gpio_direction_input()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+1 -140 replies
40/73pinctrl: remove pinctrl_gpio_direction_output()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+1 -140 replies
41/73pinctrl: remove pinctrl_gpio_set_config()drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+16 -280 replies
42/73treewide: rename pinctrl_gpio_can_use_line_new()drivers/gpio/gpiolib-cdev.c drivers/pinctrl/core.c include/linux/pinctrl/consumer.h+5 -50 replies
43/73treewide: rename pinctrl_gpio_request_new()drivers/gpio/gpio-aspeed.c drivers/gpio/gpio-em.c drivers/gpio/gpio-rcar.c +14 more+20 -200 replies
44/73treewide: rename pinctrl_gpio_free_new()drivers/gpio/gpio-aspeed.c drivers/gpio/gpio-em.c drivers/gpio/gpio-rcar.c +14 more+21 -210 replies
45/73treewide: rename pinctrl_gpio_direction_input_new()drivers/gpio/gpio-mvebu.c drivers/gpio/gpio-pxa.c drivers/gpio/gpio-rockchip.c +23 more+30 -300 replies
46/73treewide: rename pinctrl_gpio_direction_output_new()drivers/gpio/gpio-mvebu.c drivers/gpio/gpio-pxa.c drivers/gpio/gpio-rockchip.c +23 more+31 -320 replies
47/73treewide: rename pinctrl_gpio_set_config_new()drivers/gpio/gpio-aspeed.c drivers/gpio/gpiolib.c drivers/pinctrl/core.c +1 more+7 -70 replies
48/73pinctrl: change the signature of pinctrl_gpio_direction()drivers/pinctrl/core.c+7 -50 replies
49/73pinctrl: change the signature of pinctrl_get_device_gpio_range()drivers/pinctrl/core.c+10 -120 replies
50/73pinctrl: change the signature of pinctrl_match_gpio_range()drivers/pinctrl/core.c+7 -50 replies
51/73pinctrl: change the signature of gpio_to_pin()drivers/pinctrl/core.c+11 -100 replies
52/73pinctrl: change the signature of pinctrl_ready_for_gpio_range()drivers/pinctrl/core.c+12 -150 replies
53/73pinctrl: intel: lynxpoint: drop the wrappers around pinctrl_gpio_direction_input()drivers/pinctrl/intel/pinctrl-lynxpoint.c+1 -62 replies
54/73pinctrl: intel: drop the wrappers around pinctrl_gpio_direction_input()drivers/pinctrl/intel/pinctrl-intel.c+1 -66 replies
55/73pinctrl: intel: cherryview: drop the wrappers around pinctrl_gpio_direction_input()drivers/pinctrl/intel/pinctrl-cherryview.c+1 -61 reply
56/73pinctrl: st: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-st.c+2 -90 replies
57/73pinctrl: ingenic: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-ingenic.c+2 -80 replies
58/73pinctrl: as3722: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-as3722.c+1 -60 replies
59/73pinctrl: cy8c95x0: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-cy8c95x0.c+1 -61 reply
60/73pinctrl: vt8500: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/vt8500/pinctrl-wmt.c+1 -60 replies
61/73pinctrl: axp209: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-axp209.c+1 -60 replies
62/73pinctrl: rk805: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-rk805.c+1 -70 replies
63/73pinctrl: mediatek: moore: drop the wrappers around pinctrl_gpio_direction_input()drivers/pinctrl/mediatek/pinctrl-moore.c+1 -60 replies
64/73pinctrl: mediatek: common: drop the wrappers around pinctrl_gpio_direction_input()drivers/pinctrl/mediatek/pinctrl-mtk-common.c+1 -70 replies
65/73pinctrl: cirrus: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/cirrus/pinctrl-cs42l43.c+1 -60 replies
66/73pinctrl: ocelot: drop the wrapper around pinctrl_gpio_direction_input()drivers/pinctrl/pinctrl-ocelot.c+1 -70 replies
67/73pinctrl: starfive: jh7100: drop wrappers around pinctrl_gpio_request/free()drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c+2 -120 replies
68/73pinctrl: starfive: jh7110: drop wrappers around pinctrl_gpio_request/free()drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c+2 -120 replies
69/73pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input()drivers/pinctrl/stm32/pinctrl-stm32.c+3 -130 replies
70/73pinctrl: nuvoton: npcm7xx: drop wrappers around pinctrl_gpio_request/free()drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c+1 -70 replies
71/73pinctrl: nuvoton: npcm8xx: drop wrappers around pinctrl_gpio_request/free()drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c+1 -60 replies
72/73pinctrl: em: drop the wrapper around pinctrl_gpio_request()drivers/gpio/gpio-em.c+1 -60 replies
73/73pinctrl: tegra: drop the wrapper around pinctrl_gpio_request()drivers/gpio/gpio-tegra.c+1 -60 replies

Reviews trailers per patch

24 of 73 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLinus WalleijAndy ShevchenkoGeert UytterhoevenAndrew JefferyUwe Kleine-KönigHeiko StuebnerViresh KumarCharles KeepaxMika WesterbergPatrice Chotard
SeriesA-b
1/73R-b R-b
2/73
3/73R-b
4/73R-b
5/73R-b A-b
6/73
7/73
8/73R-b A-b
9/73A-b
10/73
11/73A-b
12/73
13/73
14/73
15/73R-b A-b
16/73
17/73
18/73A-b
19/73
20/73
21/73
22/73
23/73A-b
24/73
25/73
26/73
27/73
28/73
29/73R-b
30/73
31/73
32/73R-b A-b
33/73R-b A-b
34/73R-b A-b
35/73R-b
36/73
37/73
38/73
39/73
40/73
41/73
42/73
43/73
44/73
45/73
46/73
47/73
48/73R-b
49/73R-b
50/73R-b
51/73R-b
52/73R-b
53/73R-b
54/73R-b
55/73R-b
56/73
57/73
58/73
59/73R-b
60/73
61/73
62/73
63/73
64/73
65/73
66/73
67/73
68/73
69/73
70/73
71/73
72/73
73/73

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/73] pinctrl: don't use GPIOLIB global numberspace in helpers

From: Bartosz Golaszewski <[email protected]>

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.

As this is a big series and there already are conflicts between it and current pinctrl tree, I plan on sending it as a separate PR later in the merge window once the bulk of GPIO and pinctrl changes are already in master.

v2 -> v3:
- split patches modifying multiple drivers at once into separate changesets
- fix build errors reported by autobuilders

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 (73):
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: npcm7xx: use new pinctrl GPIO helpers
pinctrl: nuvoton: npcm8xx: 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: jh7100: use new pinctrl GPIO helpers
pinctrl: starfive: jh7110: 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: moore: use new pinctrl GPIO helpers
pinctrl: mediatek: common: use new pinctrl GPIO helpers
pinctrl: mediatek: paris: 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: cherryview: use new pinctrl GPIO helpers
pinctrl: intel: use new pinctrl GPIO helpers
pinctrl: intel: lynxpoint: 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: lynxpoint: drop the wrappers around
pinctrl_gpio_direction_input()
pinctrl: intel: drop the wrappers around
pinctrl_gpio_direction_input()
pinctrl: intel: cherryview: 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: moore: drop the wrappers around
pinctrl_gpio_direction_input()
pinctrl: mediatek: common: 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: jh7100: drop wrappers around
pinctrl_gpio_request/free()
pinctrl: starfive: jh7110: drop wrappers around
pinctrl_gpio_request/free()
pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input()
pinctrl: nuvoton: npcm7xx: drop wrappers around
pinctrl_gpio_request/free()
pinctrl: nuvoton: npcm8xx: 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                  |  13 +-
 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              |  57 +++++---
 38 files changed, 196 insertions(+), 303 deletions(-)
Signature · 1 line
2.39.2