u-boot/drivers/power
Andre Przywara ffb02942fa sunxi: board: simplify early PMIC setup conditions
So far we have a convoluted #ifdef mesh that guards the early AXP PMIC
setup in board.c. That combination of &&, || and negations is very hard
to read, maintain and especially to extend.

Fortunately we have those same conditions already modelled in the
Kconfig file, so they are actually redundant. On top of that the real
reason we have those preprocessor guards in the first place is about the
symbols that are *conditionally* defined: without #ifdefs the build
would break because of them being undefined for many boards.

To simplify this, just change the guards to actually look at the symbols
needed, so CONFIG_AXP_xxx_VOLT instead of CONFIG_AXPyyy_POWER.
This drastically improves the readability of this code, and makes adding
PMIC support a pure Kconfig matter.

Doing this revealed one bug in Kconfig: there is no axp_set_dcdc4() for
the AXP818, even though CONFIG_AXP_DCDC4_VOLT includes that PMIC.
Since the AXP818 wasn't included when calling axp_set_dcdc4() in board.c,
this wasn't an issue, but becomes one now, so also remove the AXP818 from
the DCDC4 Kconfig symbol.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 12:03:42 +00:00
..
acpi_pmc spl: Ensure all SPL symbols in Kconfig have some SPL dependency 2022-07-07 09:29:08 -04:00
domain tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
pmic tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
regulator tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05: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 sunxi: board: simplify early PMIC setup conditions 2023-11-12 12:03:42 +00: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