All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig
@ 2022-05-03  8:58 ` Rasmus Villemoes
  2022-05-03  8:58   ` [PATCH 2/2] pmic: pca9450: drop pointless .data entries Rasmus Villemoes
  2022-05-16 23:44   ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Jaehoon Chung
  0 siblings, 2 replies; 7+ messages in thread
From: Rasmus Villemoes @ 2022-05-03  8:58 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Fabio Estevam, Jaehoon Chung, Peng Fan, Rasmus Villemoes

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(-)

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.
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pmic: pca9450: drop pointless .data entries
  2022-05-03  8:58 ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Rasmus Villemoes
@ 2022-05-03  8:58   ` Rasmus Villemoes
  2022-05-16 23:44     ` Jaehoon Chung
  2022-05-16 23:44   ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Jaehoon Chung
  1 sibling, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2022-05-03  8:58 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Fabio Estevam, Jaehoon Chung, Peng Fan, Rasmus Villemoes

These are the i2c addresses of the chips, but that comes from device
tree. Having that information duplicated here just adds confusion.

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

diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index 2394b196c5..34cee34dba 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -81,9 +81,9 @@ static struct dm_pmic_ops pca9450_ops = {
 };
 
 static const struct udevice_id pca9450_ids[] = {
-	{ .compatible = "nxp,pca9450a", .data = 0x25, },
-	{ .compatible = "nxp,pca9450b", .data = 0x25, },
-	{ .compatible = "nxp,pca9450c", .data = 0x25, },
+	{ .compatible = "nxp,pca9450a" },
+	{ .compatible = "nxp,pca9450b" },
+	{ .compatible = "nxp,pca9450c" },
 	{ }
 };
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig
  2022-05-03  8:58 ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Rasmus Villemoes
  2022-05-03  8:58   ` [PATCH 2/2] pmic: pca9450: drop pointless .data entries Rasmus Villemoes
@ 2022-05-16 23:44   ` Jaehoon Chung
  1 sibling, 0 replies; 7+ messages in thread
From: Jaehoon Chung @ 2022-05-16 23:44 UTC (permalink / raw)
  To: Rasmus Villemoes, u-boot; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pmic: pca9450: drop pointless .data entries
  2022-05-03  8:58   ` [PATCH 2/2] pmic: pca9450: drop pointless .data entries Rasmus Villemoes
@ 2022-05-16 23:44     ` Jaehoon Chung
  2022-06-02  0:30       ` Jaehoon Chung
  0 siblings, 1 reply; 7+ messages in thread
From: Jaehoon Chung @ 2022-05-16 23:44 UTC (permalink / raw)
  To: Rasmus Villemoes, u-boot; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

On 5/3/22 17:58, Rasmus Villemoes wrote:
> These are the i2c addresses of the chips, but that comes from device
> tree. Having that information duplicated here just adds confusion.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>


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

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/pmic/pca9450.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
> index 2394b196c5..34cee34dba 100644
> --- a/drivers/power/pmic/pca9450.c
> +++ b/drivers/power/pmic/pca9450.c
> @@ -81,9 +81,9 @@ static struct dm_pmic_ops pca9450_ops = {
>  };
>  
>  static const struct udevice_id pca9450_ids[] = {
> -	{ .compatible = "nxp,pca9450a", .data = 0x25, },
> -	{ .compatible = "nxp,pca9450b", .data = 0x25, },
> -	{ .compatible = "nxp,pca9450c", .data = 0x25, },
> +	{ .compatible = "nxp,pca9450a" },
> +	{ .compatible = "nxp,pca9450b" },
> +	{ .compatible = "nxp,pca9450c" },
>  	{ }
>  };
>  


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pmic: pca9450: drop pointless .data entries
  2022-05-16 23:44     ` Jaehoon Chung
@ 2022-06-02  0:30       ` Jaehoon Chung
  2022-06-02 12:30         ` Rasmus Villemoes
  0 siblings, 1 reply; 7+ messages in thread
From: Jaehoon Chung @ 2022-06-02  0:30 UTC (permalink / raw)
  To: Rasmus Villemoes, u-boot; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

Dear Rasums,

On 5/17/22 08:44, Jaehoon Chung wrote:
> On 5/3/22 17:58, Rasmus Villemoes wrote:
>> These are the i2c addresses of the chips, but that comes from device
>> tree. Having that information duplicated here just adds confusion.
>>
>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

There is a conflict with commit 326337fb005f968911d897867d09d1228b070d84.
Could you send the patch again? Sorry for too late.

Best Regards,
Jaehoon Chung

> 
> 
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
> 
> Best Regards,
> Jaehoon Chung
> 
>> ---
>>  drivers/power/pmic/pca9450.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
>> index 2394b196c5..34cee34dba 100644
>> --- a/drivers/power/pmic/pca9450.c
>> +++ b/drivers/power/pmic/pca9450.c
>> @@ -81,9 +81,9 @@ static struct dm_pmic_ops pca9450_ops = {
>>  };
>>  
>>  static const struct udevice_id pca9450_ids[] = {
>> -	{ .compatible = "nxp,pca9450a", .data = 0x25, },
>> -	{ .compatible = "nxp,pca9450b", .data = 0x25, },
>> -	{ .compatible = "nxp,pca9450c", .data = 0x25, },
>> +	{ .compatible = "nxp,pca9450a" },
>> +	{ .compatible = "nxp,pca9450b" },
>> +	{ .compatible = "nxp,pca9450c" },
>>  	{ }
>>  };
>>  
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pmic: pca9450: drop pointless .data entries
  2022-06-02  0:30       ` Jaehoon Chung
@ 2022-06-02 12:30         ` Rasmus Villemoes
  2022-06-14  2:12           ` Jaehoon Chung
  0 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2022-06-02 12:30 UTC (permalink / raw)
  To: Jaehoon Chung, u-boot; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

On 02/06/2022 02.30, Jaehoon Chung wrote:
> Dear Rasums,
> 
> On 5/17/22 08:44, Jaehoon Chung wrote:
>> On 5/3/22 17:58, Rasmus Villemoes wrote:
>>> These are the i2c addresses of the chips, but that comes from device
>>> tree. Having that information duplicated here just adds confusion.
>>>
>>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> 
> There is a conflict with commit 326337fb005f968911d897867d09d1228b070d84.
> Could you send the patch again? Sorry for too late.

Oh, but that commit repurposes the .data member - or rather, "purposes",
but I don't think that's a real verb. Previously the driver_data wasn't
used for anything, but it is now.

So my patch should simply be dropped.

Rasmus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pmic: pca9450: drop pointless .data entries
  2022-06-02 12:30         ` Rasmus Villemoes
@ 2022-06-14  2:12           ` Jaehoon Chung
  0 siblings, 0 replies; 7+ messages in thread
From: Jaehoon Chung @ 2022-06-14  2:12 UTC (permalink / raw)
  To: Rasmus Villemoes, u-boot; +Cc: Marek Vasut, Fabio Estevam, Peng Fan

On 6/2/22 21:30, Rasmus Villemoes wrote:
> On 02/06/2022 02.30, Jaehoon Chung wrote:
>> Dear Rasums,
>>
>> On 5/17/22 08:44, Jaehoon Chung wrote:
>>> On 5/3/22 17:58, Rasmus Villemoes wrote:
>>>> These are the i2c addresses of the chips, but that comes from device
>>>> tree. Having that information duplicated here just adds confusion.
>>>>
>>>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
>>
>> There is a conflict with commit 326337fb005f968911d897867d09d1228b070d84.
>> Could you send the patch again? Sorry for too late.
> 
> Oh, but that commit repurposes the .data member - or rather, "purposes",
> but I don't think that's a real verb. Previously the driver_data wasn't
> used for anything, but it is now.
> 
> So my patch should simply be dropped.

Okay. Thanks!

Best Regards,
Jaehoon Chung

> 
> Rasmus
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-14  2:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220503085824epcas1p2f63014c42ef5a15cfba9eb8930a5a99c@epcas1p2.samsung.com>
2022-05-03  8:58 ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Rasmus Villemoes
2022-05-03  8:58   ` [PATCH 2/2] pmic: pca9450: drop pointless .data entries Rasmus Villemoes
2022-05-16 23:44     ` Jaehoon Chung
2022-06-02  0:30       ` Jaehoon Chung
2022-06-02 12:30         ` Rasmus Villemoes
2022-06-14  2:12           ` Jaehoon Chung
2022-05-16 23:44   ` [PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.