Message ID | 20230719212049.709358-1-jonas@kwiboo.se |
---|---|
Headers | show |
Series | Keep fixed/gpio regulator enable count in balance | expand |
чт, 20 лип. 2023 р. о 00:20 Jonas Karlman <jonas@kwiboo.se> пише: > > 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: Not sure if I am allowed to leave reviewed-by but as an active u-boot user, may I ask you to expand migration from regulator_set_enable to less restricted version to all calls of regulator_set_enable? > 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 >
On 2023-07-21 08:25, Svyatoslav Ryhel wrote: > чт, 20 лип. 2023 р. о 00:20 Jonas Karlman <jonas@kwiboo.se> пише: >> >> 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: > > Not sure if I am allowed to leave reviewed-by but as an active u-boot user, may > I ask you to expand migration from regulator_set_enable to less restricted > version to all calls of regulator_set_enable? I try to only touch code that I can runtime test to verify that any change is valid and works on real hw. Could possible do a separate series for dwc3-meson if I can find my old amlogic boards. Regards, Jonas > >> 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 >>
On Wed, 19 Jul 2023 21:20:53 +0000, Jonas Karlman wrote: > 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. > > [...] Applied to u-boot/next, thanks!