Skip to contentSkip to conversation

power: regulator: Kconfig: add a dependency for POWER_SUPPORT for SPL

PATCH New Nishanth Menon 3 participants 3 messages Nov 20, 2020 – Jan 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: regulator: Kconfig: add a dependency for POWER_SUPPORT for SPL

power/regulator will not be built if just CONFIG_SPL_DM_REGULATOR is enabled. It needs CONFIG_SPL_POWER_SUPPORT to be enabled as well.

For example, if we just need a GPIO regulator in SPL:
CONFIG_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_DM_REGULATOR_GPIO=y

Will not suffice, since the entire regulator build for SPL depends on CONFIG_SPL_POWER_SUPPORT. Elaborate that information in the Kconfig dependency.

---
 drivers/power/regulator/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/Kconfig +1 -1
index d431102462a8..fbbea18c7d1b 100644
@@ -18,7 +18,7 @@ config DM_REGULATOR
 
 config SPL_DM_REGULATOR
 	bool "Enable regulators for SPL"
-	depends on DM_REGULATOR
+	depends on DM_REGULATOR && SPL_POWER_SUPPORT
 	---help---
 	Regulators are seldom needed in SPL. Even if they are accessed, some
 	code space can be saved by accessing the PMIC registers directly.
Signature · 1 line
2.25.1.377.g2d2118b814c1
#1 lore raw

PATCH 1/1 power: regulator: Kconfig: add a dependency for POWER_SUPPORT for SPL

Quoted 9 lines · Nishanth Menon

power/regulator will not be built if just CONFIG_SPL_DM_REGULATOR is enabled. It needs CONFIG_SPL_POWER_SUPPORT to be enabled as well.

For example, if we just need a GPIO regulator in SPL:
CONFIG_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_DM_REGULATOR_GPIO=y

Quoted 5 lines

Will not suffice, since the entire regulator build for SPL depends on CONFIG_SPL_POWER_SUPPORT. Elaborate that information in the Kconfig dependency.

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/Kconfig +1 -1
index d431102462a8..fbbea18c7d1b 100644
@@ -18,7 +18,7 @@ config DM_REGULATOR
 
 config SPL_DM_REGULATOR
 	bool "Enable regulators for SPL"
-	depends on DM_REGULATOR
+	depends on DM_REGULATOR && SPL_POWER_SUPPORT
 	---help---
 	Regulators are seldom needed in SPL. Even if they are accessed, some
 	code space can be saved by accessing the PMIC registers directly.
#2 lore raw

PATCH 1/1 power: regulator: Kconfig: add a dependency for POWER_SUPPORT for SPL

In reply to Nishanth Menon
Quoted 9 lines · Nishanth Menon

power/regulator will not be built if just CONFIG_SPL_DM_REGULATOR is enabled. It needs CONFIG_SPL_POWER_SUPPORT to be enabled as well.

For example, if we just need a GPIO regulator in SPL:
CONFIG_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_DM_REGULATOR_GPIO=y

Quoted 6 lines

Will not suffice, since the entire regulator build for SPL depends on CONFIG_SPL_POWER_SUPPORT. Elaborate that information in the Kconfig dependency.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210118/6d9aba40/attachment.sig>