public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpiolib: introduce devm_fwnode_gpiod_get_optional
@ 2026-01-26 14:27 Michael Tretter
  2026-01-26 14:27 ` [PATCH v2 1/2] gpiolib: introduce devm_fwnode_gpiod_get_optional() wrapper Michael Tretter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Tretter @ 2026-01-26 14:27 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Matti Vaittinen,
	Liam Girdwood, Mark Brown
  Cc: linux-gpio, kernel, Michael Tretter, Stefan Kerkmann

There are various helpers to simplify the handling of optional gpios.
The devm_fwnode_gpiod_get() lacks the _optional variant, and drivers
have to explicitly handle the error for optional gpios.

Introduce a devm_fwnode_gpiod_get_optional helper and simplify the
BD71815 voltage regulator driver by using this helper.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changes in v2:
- Add kerneldoc for devm_fwnode_gpiod_get_optional
- Link to v1: https://patch.msgid.link/20260123-gpio-devm_fwnode_gpiod_get_optional-v1-0-fb49905452a6@pengutronix.de

---
Michael Tretter (1):
      regulator: bd71815: switch to devm_fwnode_gpiod_get_optional

Stefan Kerkmann (1):
      gpiolib: introduce devm_fwnode_gpiod_get_optional() wrapper

 drivers/regulator/bd71815-regulator.c | 15 ++++++---------
 include/linux/gpio/consumer.h         | 36 +++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 9 deletions(-)
---
base-commit: c072629f05d7bca1148ab17690d7922a31423984
change-id: 20260123-gpio-devm_fwnode_gpiod_get_optional-e96227cd393b

Best regards,
-- 
Michael Tretter <m.tretter@pengutronix.de>


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

end of thread, other threads:[~2026-01-27 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 14:27 [PATCH v2 0/2] gpiolib: introduce devm_fwnode_gpiod_get_optional Michael Tretter
2026-01-26 14:27 ` [PATCH v2 1/2] gpiolib: introduce devm_fwnode_gpiod_get_optional() wrapper Michael Tretter
2026-01-27  6:53   ` Matti Vaittinen
2026-01-27 19:40   ` Andy Shevchenko
2026-01-26 14:27 ` [PATCH v2 2/2] regulator: bd71815: switch to devm_fwnode_gpiod_get_optional Michael Tretter
2026-01-27  9:17 ` [PATCH v2 0/2] gpiolib: introduce devm_fwnode_gpiod_get_optional Bartosz Golaszewski

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