[PATCH 0/5] Keep fixed/gpio regulator enable count in balance
Jonas Karlman
jonas at kwiboo.se
Wed Jul 19 23:20:53 CEST 2023
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(-)
--
2.41.0
More information about the U-Boot
mailing list