diff mbox series

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

Message ID 20201120041054.20083-1-nm@ti.com
State Accepted
Commit 2d572ede1185db2129685e8cedfb690a5e3c4d3d
Delegated to: Tom Rini
Headers show
Series power: regulator: Kconfig: add a dependency for POWER_SUPPORT for SPL | expand

Commit Message

Nishanth Menon Nov. 20, 2020, 4:10 a.m. UTC
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.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 drivers/power/regulator/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung Nov. 23, 2020, 4:26 a.m. UTC | #1
On 11/20/20 1:10 PM, Nishanth Menon wrote:
> 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.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/regulator/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
> index d431102462a8..fbbea18c7d1b 100644
> --- a/drivers/power/regulator/Kconfig
> +++ b/drivers/power/regulator/Kconfig
> @@ -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.
>
Tom Rini Jan. 18, 2021, 1 p.m. UTC | #2
On Thu, Nov 19, 2020 at 10:10:54PM -0600, Nishanth Menon wrote:

> 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.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index d431102462a8..fbbea18c7d1b 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -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.