diff mbox series

[1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig

Message ID 20220503085807.904742-1-rasmus.villemoes@prevas.dk
State Accepted
Commit 752bea3ca4d095e4da948c643fc6d6ea7427c773
Delegated to: Jaehoon Chung
Headers show
Series [1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig | expand

Commit Message

Rasmus Villemoes May 3, 2022, 8:58 a.m. UTC
The pca9450 driver uses dm_i2c_{read,write}, which
are (unsurprisingly) only available with DM_I2C. Make sure one can't
create an unbuildable .config by adding proper dependencies.

While here, append "in SPL" to the prompt for the SPL_ variant so it
doesn't read the same as the one for the non-SPL_ variant.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/power/pmic/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jaehoon Chung May 16, 2022, 11:44 p.m. UTC | #1
On 5/3/22 17:58, Rasmus Villemoes wrote:
> The pca9450 driver uses dm_i2c_{read,write}, which
> are (unsurprisingly) only available with DM_I2C. Make sure one can't
> create an unbuildable .config by adding proper dependencies.
> 
> While here, append "in SPL" to the prompt for the SPL_ variant so it
> doesn't read the same as the one for the non-SPL_ variant.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

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

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/pmic/Kconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
> index 953c92e212..6c534aead7 100644
> --- a/drivers/power/pmic/Kconfig
> +++ b/drivers/power/pmic/Kconfig
> @@ -158,13 +158,15 @@ config SPL_DM_PMIC_MP5416
>  
>  config DM_PMIC_PCA9450
>  	bool "Enable Driver Model for PMIC PCA9450"
> +	depends on DM_I2C
>  	help
>  	  This config enables implementation of driver-model pmic uclass features
>  	  for PMIC PCA9450. The driver implements read/write operations.
>  
>  config SPL_DM_PMIC_PCA9450
> -	bool "Enable Driver Model for PMIC PCA9450"
> +	bool "Enable Driver Model for PMIC PCA9450 in SPL"
>  	depends on SPL_DM_PMIC
> +	depends on SPL_DM_I2C
>  	help
>  	  This config enables implementation of driver-model pmic uclass features
>  	  for PMIC PCA9450 in SPL. The driver implements read/write operations.
diff mbox series

Patch

diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index 953c92e212..6c534aead7 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -158,13 +158,15 @@  config SPL_DM_PMIC_MP5416
 
 config DM_PMIC_PCA9450
 	bool "Enable Driver Model for PMIC PCA9450"
+	depends on DM_I2C
 	help
 	  This config enables implementation of driver-model pmic uclass features
 	  for PMIC PCA9450. The driver implements read/write operations.
 
 config SPL_DM_PMIC_PCA9450
-	bool "Enable Driver Model for PMIC PCA9450"
+	bool "Enable Driver Model for PMIC PCA9450 in SPL"
 	depends on SPL_DM_PMIC
+	depends on SPL_DM_I2C
 	help
 	  This config enables implementation of driver-model pmic uclass features
 	  for PMIC PCA9450 in SPL. The driver implements read/write operations.