Skip to content

Keep fixed/gpio regulator enable count in balance

Jonas Karlman u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5adc: Use regulator_set_enable_if_alloweddrivers/adc/adc-uclass.c+10 -121 reply
2/5usb: dwc2: Use regulator_set_enable_if_alloweddrivers/usb/host/dwc2.c+6 -84 replies
3/5usb: ehci-generic: Use regulator_set_enable_if_alloweddrivers/usb/host/ehci-generic.c+11 -125 replies
4/5mmc: Use regulator_set_enable_if_alloweddrivers/mmc/mmc.c+6 -42 replies
5/5mmc: dw_mmc: Keep vqmmc-supply enable count in balancedrivers/mmc/dw_mmc.c+4 -00 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchSimon GlassSvyatoslav RyhelMarek Vasut
1/5R-b T-b
2/5R-b T-b R-b
3/5R-b
4/5R-b T-b T-b
5/5

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

Read the v1 thread

Cover letter [PATCH 0/5] Keep fixed/gpio regulator enable count in balance

The commit 4fcba5d556b4 ("regulator: implement basic reference counter") have made it more important to keep fixed/gpio regulators enable/disable state in balance.

This series fixes an inbalance in the mmc_dw driver and changes to use the more relaxed regulator_set_enable_if_allowed function for a few other drivers.

The regulator_set_enable_if_allowed function is more relaxed and will return ENOSYS if the provided regulator is NULL or when DM_REGULATOR was disabled. Using the following call convention should be safe:

  ret = regulator_set_enable_if_allowed(<supply>, <true|false>);
  if (ret && ret != -ENOSYS)
          return ret;

Jonas Karlman (5):
adc: Use regulator_set_enable_if_allowed
usb: dwc2: Use regulator_set_enable_if_allowed
usb: ehci-generic: Use regulator_set_enable_if_allowed
mmc: Use regulator_set_enable_if_allowed
mmc: dw_mmc: Keep vqmmc-supply enable count in balance

 drivers/adc/adc-uclass.c        | 22 ++++++++++------------
 drivers/mmc/dw_mmc.c            |  4 ++++
 drivers/mmc/mmc.c               | 10 ++++++----
 drivers/usb/host/dwc2.c         | 14 ++++++--------
 drivers/usb/host/ehci-generic.c | 23 +++++++++++------------
 5 files changed, 37 insertions(+), 36 deletions(-)
Signature · 1 line
2.41.0