Skip to content

gpiolib: Two new helpers and way toward fwnode

Andy Shevchenko linux-amlogic linux-arm-kernel linux-gpio linux-renesas-soc linux-samsung-soc lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest13 patches 19 repliesIn review
  2. v313 patches 1 replySuperseded
  3. v213 patches 17 repliesSuperseded

Changes in v4 from the cover letter

- fixed compilation of the Samsung pin control drivers (LKP)
- explained in the commit message why namespacing is good for meson defs
- added tag to one of meson patches (Neil)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13gpiolib: Introduce for_each_gpiochip_node() loop helperinclude/linux/gpio/driver.h+6 -11 reply
2/13gpiolib: Introduce gpiochip_node_count() helperinclude/linux/gpio/driver.h+11 -01 reply
3/13pinctrl: stm32: Replace custom code by gpiochip_node_count() calldrivers/pinctrl/stm32/pinctrl-stm32.c+3 -50 replies
4/13pinctrl: stm32: Switch to use for_each_gpiochip_node() helperdrivers/pinctrl/stm32/pinctrl-stm32.c+33 -390 replies
5/13pinctrl: samsung: Switch to use for_each_gpiochip_node() helperdrivers/pinctrl/samsung/pinctrl-exynos.c drivers/pinctrl/samsung/pinctrl-s3c24xx.c drivers/pinctrl/samsung/pinctrl-s3c64xx.c +2 more+22 -247 replies
6/13pinctrl: renesas: rza1: Replace custom code by gpiochip_node_count() calldrivers/pinctrl/renesas/pinctrl-rza1.c+1 -160 replies
7/13pinctrl: renesas: rza1: Switch to use for_each_gpiochip_node() helperdrivers/pinctrl/renesas/pinctrl-rza1.c+13 -170 replies
8/13pinctrl: npcm7xx: Switch to use for_each_gpiochip_node() helperdrivers/pinctrl/nuvoton/pinctrl-npcm7xx.c+62 -800 replies
9/13pinctrl: meson: Rename REG_* to MESON_REG_*drivers/pinctrl/meson/pinctrl-meson.c drivers/pinctrl/meson/pinctrl-meson.h+24 -243 replies
10/13pinctrl: meson: Enable COMPILE_TESTdrivers/pinctrl/meson/Kconfig+1 -10 replies
11/13pinctrl: meson: Replace custom code by gpiochip_node_count() calldrivers/pinctrl/meson/pinctrl-meson.c+12 -166 replies
12/13pinctrl: armada-37xx: Switch to use fwnode instead of of_nodedrivers/pinctrl/mvebu/pinctrl-armada-37xx.c+7 -110 replies
13/13pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register()drivers/pinctrl/mvebu/pinctrl-armada-37xx.c+3 -130 replies

Reviews trailers per patch

8 of 13 patches have a Reviewed-by or Acked-by.

PatchFabien DessenneGeert UytterhoevenNeil ArmstrongBartosz GolaszewskiKrzysztof Kozlowski
1/13R-b T-b A-b
2/13R-b T-b A-b
3/13R-b
4/13R-b
5/13T-b
6/13R-b T-b A-b
7/13R-b T-b A-b
8/13
9/13
10/13R-b
11/13R-b
12/13
13/13

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

Read the v4 thread

Cover letter [PATCH v4 00/13] gpiolib: Two new helpers and way toward fwnode

This is a spin-off of the previous work of switching GPIO library to use fwnode instead of of_node. Here we introduce a couple of a new macro helpers, which allows to switch some of the drivers to use fwnode and partially fwnode APIs. As a result of this cleanup a few drivers switched to use GPIO fwnode instead of of_node.

Bart, Linus, I can take it thru my tree with an immutable branch if it's the way you prefer, otherwise please suggest on how to proceed.

Changelog v4:
- fixed compilation of the Samsung pin control drivers (LKP)
- explained in the commit message why namespacing is good for meson defs
- added tag to one of meson patches (Neil)

Changelog v3:
- moved count initialization to the definition in patch 2 (Geert)
- replaced of_args by args, used %pfwP in patch 7 (Geert)
- fixed kernel doc warning in patch 7
- added tags to patches 1, 2, 6, and 7 (Geert)
- added tag to patch 4 (Fabien)
- renamed MREG to MESON_REG in patch 9 (Neil)
- added tag to patch 10 (Neil)
- used --base for cover-letter

Changelog v2:
- properly based, so kbuild bot may test it (LKP)
- fixed typo in the macro (Geert)
- split to two macro helpers and rename the gpiochip_count()
- tagged one of stm32 and one of meson patches (Fabien, Neil)
- unified previously standalone armada patch
- due to above rewrote the armada patch from v1 completely (Sergey)
- added a lot of a new patches
- compile tested all of them on x86

Andy Shevchenko (13):
gpiolib: Introduce for_each_gpiochip_node() loop helper
gpiolib: Introduce gpiochip_node_count() helper
pinctrl: stm32: Replace custom code by gpiochip_node_count() call
pinctrl: stm32: Switch to use for_each_gpiochip_node() helper
pinctrl: samsung: Switch to use for_each_gpiochip_node() helper
pinctrl: renesas: rza1: Replace custom code by gpiochip_node_count()
call
pinctrl: renesas: rza1: Switch to use for_each_gpiochip_node() helper
pinctrl: npcm7xx: Switch to use for_each_gpiochip_node() helper
pinctrl: meson: Rename REG_* to MESON_REG_*
pinctrl: meson: Enable COMPILE_TEST
pinctrl: meson: Replace custom code by gpiochip_node_count() call
pinctrl: armada-37xx: Switch to use fwnode instead of of_node
pinctrl: armada-37xx: Reuse GPIO fwnode in
armada_37xx_irqchip_register()

 drivers/pinctrl/meson/Kconfig               |   2 +-
 drivers/pinctrl/meson/pinctrl-meson.c       |  52 ++++---
 drivers/pinctrl/meson/pinctrl-meson.h       |  24 ++--
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c |  34 ++---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c   | 142 +++++++++-----------
 drivers/pinctrl/renesas/pinctrl-rza1.c      |  47 ++-----
 drivers/pinctrl/samsung/pinctrl-exynos.c    |   8 +-
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c   |   2 +-
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c   |   4 +-
 drivers/pinctrl/samsung/pinctrl-samsung.c   |  30 ++---
 drivers/pinctrl/samsung/pinctrl-samsung.h   |   2 +-
 drivers/pinctrl/stm32/pinctrl-stm32.c       |  80 +++++------
 include/linux/gpio/driver.h                 |  18 ++-
 13 files changed, 198 insertions(+), 247 deletions(-)

base-commit: e5071887cd2296a7704dbcd10c1cedf0f11cdbd5

Signature · 1 line
2.35.1