Skip to content

gpiolib: introduce devm_fwnode_gpiod_get_optional

Michael Tretter linux-gpio 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am 20260126-gpio-devm_fwnode_gpiod_get_optional-v2-0-ec34f8e35077@pengutronix.de change-id 20260123-gpio-devm_fwnode_gpiod_get_optional-e96227cd393b

Versions newest first

  1. v2 Latest2 patches 3 repliesApplied
  2. v12 patches 9 repliesSuperseded

Changes in v2 from the cover letter

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2gpiolib: introduce devm_fwnode_gpiod_get_optional() wrapperinclude/linux/gpio/consumer.h+36 -02 replies
2/2regulator: bd71815: switch to devm_fwnode_gpiod_get_optionaldrivers/regulator/bd71815-regulator.c+6 -90 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMatti VaittinenMark Brown
1/2R-b
2/2R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] gpiolib: introduce devm_fwnode_gpiod_get_optional

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.

---
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,

Signature · 1 line
Michael Tretter <[email protected]>