public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] gpiolib: unify gpio-hog code
@ 2026-03-05  9:51 Bartosz Golaszewski
  2026-03-05  9:51 ` [PATCH 1/6] gpio: of: clear OF_POPULATED on hog nodes in remove path Bartosz Golaszewski
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Bartosz Golaszewski @ 2026-03-05  9:51 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Geert Uytterhoeven,
	Frank Rowand, Mika Westerberg, Andy Shevchenko, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Russell King, Jonathan Corbet,
	Shuah Khan
  Cc: linux-gpio, linux-kernel, linux-acpi, linux-arm-kernel,
	linux-omap, linux-doc, brgl, Bartosz Golaszewski, stable

GPIO hogs are handled separately in three places: for OF, ACPI and
machine lookup. In addition hogs cannot be set up using software nodes.
A lot of that code is actually redundant and - except for some special
handling of OF nodes - can be unified in one place.

This series moves hogging into GPIO core and bases it on fwnode API
(with a single helper from OF to translate devicetree properties into
lookup flags), converts the two remaining users of machine hogs to using
software node approach and removes machine hog support entirely. In
addition, there's a patch extending the configurability of gpio-sim now
that it uses software nodes for hogs.

For merging: I think this should go through the GPIO tree with an Ack
from OMAP1 maintainers.

Even with the new feature for gpio-sim, this series still removes twice
the number of lines, it adds.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Bartosz Golaszewski (6):
      gpio: of: clear OF_POPULATED on hog nodes in remove path
      gpio: move hogs into GPIO core
      gpio: sim: use fwnode-based GPIO hogs
      ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes
      gpio: remove machine hogs
      gpio: sim: allow to define the active-low setting of a simulated hog

 Documentation/driver-api/gpio/board.rst |  16 ---
 arch/arm/mach-omap1/board-ams-delta.c   |  32 ++++-
 drivers/gpio/gpio-sim.c                 | 200 +++++++++++++++-----------------
 drivers/gpio/gpiolib-acpi-core.c        |  70 -----------
 drivers/gpio/gpiolib-of.c               | 148 +++--------------------
 drivers/gpio/gpiolib-of.h               |   9 ++
 drivers/gpio/gpiolib.c                  | 139 +++++++++++++---------
 drivers/gpio/gpiolib.h                  |   3 +
 include/linux/gpio/machine.h            |  33 ------
 9 files changed, 233 insertions(+), 417 deletions(-)
---
base-commit: c025f6cf4209e1542ec2afebe49f42bbaf1a5c7b
change-id: 20260224-gpio-hog-fwnode-b46a53196253

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


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

end of thread, other threads:[~2026-03-06 11:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05  9:51 [PATCH 0/6] gpiolib: unify gpio-hog code Bartosz Golaszewski
2026-03-05  9:51 ` [PATCH 1/6] gpio: of: clear OF_POPULATED on hog nodes in remove path Bartosz Golaszewski
2026-03-05 12:58   ` Linus Walleij
2026-03-05  9:51 ` [PATCH 2/6] gpio: move hogs into GPIO core Bartosz Golaszewski
2026-03-05 12:59   ` Linus Walleij
2026-03-05 14:25   ` Mika Westerberg
2026-03-06  1:06   ` kernel test robot
2026-03-06 11:53   ` Andy Shevchenko
2026-03-05  9:51 ` [PATCH 3/6] gpio: sim: use fwnode-based GPIO hogs Bartosz Golaszewski
2026-03-05 12:59   ` Linus Walleij
2026-03-05  9:51 ` [PATCH 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes Bartosz Golaszewski
2026-03-05 12:59   ` Linus Walleij
2026-03-06  0:44   ` Kevin Hilman
2026-03-05  9:51 ` [PATCH 5/6] gpio: remove machine hogs Bartosz Golaszewski
2026-03-05 13:00   ` Linus Walleij
2026-03-05  9:51 ` [PATCH 6/6] gpio: sim: allow to define the active-low setting of a simulated hog Bartosz Golaszewski
2026-03-05 13:01   ` Linus Walleij
2026-03-06 11:58 ` [PATCH 0/6] gpiolib: unify gpio-hog code Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox