u-boot/include/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
..
ab8500.h power: pmic: Add driver for ST-Ericsson AB8500 via PRCMU 2021-07-14 16:48:14 -04:00
acpi_pmc.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
act8846_pmic.h power: act8846_pmic: fix number of registers 2023-01-31 22:05:03 +09:00
as3722.h common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
battery.h
bd71837.h
da9063_pmic.h power: regulator: add driver for Dialog DA9063 PMIC 2020-01-27 19:54:20 -05:00
fan53555.h power: fan53555: add support for Silergy SYR82X and SYR83X 2019-11-23 22:29:49 +08:00
hi6553_pmic.h
lp873x.h
lp87565.h
ltc3676_pmic.h
max8997_muic.h
max8997_pmic.h
max8998_pmic.h
max17042_fg.h
max77686_pmic.h i2c: Convert CONFIG_POWER_I2C et al to Kconfig 2021-09-04 12:26:02 -04:00
max77693_fg.h
max77693_muic.h
max77693_pmic.h
mc34vr500_pmic.h
mp5416.h power: pmic: add driver for Monolithic Power mp5416 2021-01-18 15:23:06 -05:00
palmas.h
pca9450.h power: pmic: Add NXP PCA9451A PMIC support 2023-03-30 00:45:39 +02:00
pfuze100_pmic.h power: pfuze100: Add MEMx register definitions 2022-03-25 16:42:40 -04:00
pfuze3000_pmic.h
pmic.h power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY) 2023-05-10 16:45:42 -04:00
power_chrg.h
regulator.h power: regulator: Only run autoset once for each regulator 2023-10-07 16:49:41 +08:00
rk8xx_pmic.h rockchip: Add option to prevent booting on power plug-in 2022-06-29 11:42:10 +08:00
rn5t567_pmic.h
s2mps11.h
s5m8767.h
sandbox_pmic.h
stpmic1.h stm32mp: stpmic1: remove the debug unit request by debugger 2022-06-17 14:12:27 +02:00
tps62362.h
tps65090.h
tps65217.h
tps65218.h
tps65219.h power: add driver for the TPS65219 PMIC 2022-05-09 13:40:24 -04:00
tps65910.h
tps65910_pmic.h
tps65941.h power: pmic: tps65941: Add compatible for LP876441 2021-07-15 17:56:04 +05:30