u-boot/drivers/power
Jonas Karlman d99fb64a98 power: regulator: Only run autoset once for each regulator
With the commit 4fcba5d556 ("regulator: implement basic reference
counter"), keeping regulator enablement in balance become more important.
Calling regulator_autoset multiple times on a fixed regulator increase
the enable count for each call, resulting in an unbalanced enable count.

Introduce a AUTOSET_DONE flag and use it to mark that autoset has run
for the regulator. Return -EALREADY on any subsequent call to autoset.

This fixes so that the enable count is only ever increased by one per
regulator for autoset.

Fixes: 4fcba5d556 ("regulator: implement basic reference counter")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-07 16:49:41 +08:00
..
acpi_pmc spl: Ensure all SPL symbols in Kconfig have some SPL dependency 2022-07-07 09:29:08 -04:00
domain imx: mach: correct SCU API usage 2023-07-13 11:29:40 +02:00
pmic common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
regulator power: regulator: Only run autoset once for each regulator 2023-10-07 16:49:41 +08:00
axp152.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
axp209.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
axp221.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
axp305.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
axp809.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
axp818.c power: axp: Avoid do_poweroff conflict with sysreset 2021-10-25 14:50:54 +01:00
exynos-tmu.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
Kconfig Convert CONFIG_TPS6586X_POWER et al to Kconfig 2022-12-05 16:08:37 -05:00
Makefile power: Drop unused muic_max77693 driver and mfd code 2023-02-07 14:33:49 -05:00
mt6323.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
palmas.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
power_core.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
power_dialog.c global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
power_fsl.c global: Migrate CONFIG_FSL_PMIC_MODE to CFG 2022-12-23 10:09:43 -05:00
power_i2c.c imx: imx8mn_evk: correct stack/malloc adress 2021-01-23 11:30:30 +01:00
power_spi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sy8106a.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps6586x.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
twl4030.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
twl6030.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00