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 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bd71837.h regulator: bd718x7: support ROHM BD71837 and BD71847 PMICs 2019-07-19 15:18:47 +02:00
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 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lp873x.h power: pmic: lp873x: Add the base pmic support 2016-10-11 10:17:06 -06:00
lp87565.h power: pmic: lp87565: Add the basic pmic support 2017-06-09 20:25:16 +09:00
ltc3676_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max8997_muic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max8997_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max8998_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max17042_fg.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max77686_pmic.h i2c: Convert CONFIG_POWER_I2C et al to Kconfig 2021-09-04 12:26:02 -04:00
max77693_fg.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max77693_muic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
max77693_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mc34vr500_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mp5416.h power: pmic: add driver for Monolithic Power mp5416 2021-01-18 15:23:06 -05:00
palmas.h regulator: palmas: disable bypass when the LDO is enabled 2017-08-01 11:58:01 +09:00
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 power: pmic: Let PFUZE3000 see all 256 registers 2018-06-27 09:47:46 +02:00
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 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
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 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
s2mps11.h power: regulator: s2mps11: add a regulator driver for s2mps11 2018-01-24 16:07:19 +09:00
s5m8767.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stpmic1.h stm32mp: stpmic1: remove the debug unit request by debugger 2022-06-17 14:12:27 +02:00
tps62362.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65090.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65217.h power: make most tps drivers and the twl4030 driver compatible with DM_I2C 2018-12-10 06:17:30 +01:00
tps65218.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65219.h power: add driver for the TPS65219 PMIC 2022-05-09 13:40:24 -04:00
tps65910.h power: make most tps drivers and the twl4030 driver compatible with DM_I2C 2018-12-10 06:17:30 +01:00
tps65910_pmic.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65941.h power: pmic: tps65941: Add compatible for LP876441 2021-07-15 17:56:04 +05:30