All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices
@ 2019-04-05 10:32 Luca Ceresoli
  2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Luca Ceresoli @ 2019-04-05 10:32 UTC (permalink / raw)
  To: u-boot

The Kconfig help has not been updated while adding PCA9547 and PCA9646.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 drivers/i2c/muxes/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index b0da67ce2c6b..26be78f685de 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -33,7 +33,7 @@ config I2C_MUX_PCA954x
 	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
 	  partitioning I2C bus and connect multiple devices with the same address
 	  to the same I2C controller where driver handles proper routing to
-	  target i2c device. PCA9544 and PCA9548 are supported.
+	  target i2c device. PCA9544, PCA9547 PCA9548 and PCA9646 are supported.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"
-- 
2.21.0

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

* [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field
  2019-04-05 10:32 [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Luca Ceresoli
@ 2019-04-05 10:32 ` Luca Ceresoli
  2019-04-05 10:57   ` Michal Simek
  2019-04-09  6:04   ` Heiko Schocher
  2019-04-05 10:32 ` [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch Luca Ceresoli
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Luca Ceresoli @ 2019-04-05 10:32 UTC (permalink / raw)
  To: u-boot

The chip_desc.enable field is used only for muxes, not tor switches.
Document it and remove the unused values.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 drivers/i2c/muxes/pca954x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index bd4e9abe5f3c..5669753ce14d 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -22,7 +22,7 @@ enum pca_type {
 };
 
 struct chip_desc {
-	u8 enable;
+	u8 enable; /* Enable mask in ctl register (used for muxes only) */
 	enum muxtype {
 		pca954x_ismux = 0,
 		pca954x_isswi,
@@ -48,12 +48,10 @@ static const struct chip_desc chips[] = {
 		.width = 8,
 	},
 	[PCA9548] = {
-		.enable = 0x8,
 		.muxtype = pca954x_isswi,
 		.width = 8,
 	},
 	[PCA9646] = {
-		.enable = 0x0,
 		.muxtype = pca954x_isswi,
 		.width = 4,
 	},
-- 
2.21.0

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

* [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch
  2019-04-05 10:32 [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Luca Ceresoli
  2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
@ 2019-04-05 10:32 ` Luca Ceresoli
  2019-04-09  6:07   ` Heiko Schocher
  2019-04-05 10:58 ` [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Michal Simek
  2019-04-09  6:03 ` Heiko Schocher
  3 siblings, 1 reply; 9+ messages in thread
From: Luca Ceresoli @ 2019-04-05 10:32 UTC (permalink / raw)
  To: u-boot

The PCA9543 is a 2-channel I2C switch.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 drivers/i2c/muxes/Kconfig   | 10 +++++-----
 drivers/i2c/muxes/pca954x.c |  6 ++++++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index 26be78f685de..7de4977c9c4a 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -29,11 +29,11 @@ config I2C_MUX_PCA954x
 	tristate "TI PCA954x I2C Mux/switches"
 	depends on I2C_MUX
 	help
-	  If you say yes here you get support for the TI PCA954x
-	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
-	  partitioning I2C bus and connect multiple devices with the same address
-	  to the same I2C controller where driver handles proper routing to
-	  target i2c device. PCA9544, PCA9547 PCA9548 and PCA9646 are supported.
+	  If you say yes here you get support for the TI PCA954x I2C mux/switch
+	  devices. It is x width I2C multiplexer which enables to partitioning
+	  I2C bus and connect multiple devices with the same address to the same
+	  I2C controller where driver handles proper routing to target i2c
+	  device. PCA9543, PCA9544, PCA9547 PCA9548 and PCA9646 are supported.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 5669753ce14d..a630ce991d04 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -15,6 +15,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 enum pca_type {
+	PCA9543,
 	PCA9544,
 	PCA9547,
 	PCA9548,
@@ -37,6 +38,10 @@ struct pca954x_priv {
 };
 
 static const struct chip_desc chips[] = {
+	[PCA9543] = {
+		.muxtype = pca954x_isswi,
+		.width = 2,
+	},
 	[PCA9544] = {
 		.enable = 0x4,
 		.muxtype = pca954x_ismux,
@@ -87,6 +92,7 @@ static const struct i2c_mux_ops pca954x_ops = {
 };
 
 static const struct udevice_id pca954x_ids[] = {
+	{ .compatible = "nxp,pca9543", .data = PCA9543 },
 	{ .compatible = "nxp,pca9544", .data = PCA9544 },
 	{ .compatible = "nxp,pca9547", .data = PCA9547 },
 	{ .compatible = "nxp,pca9548", .data = PCA9548 },
-- 
2.21.0

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

* [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field
  2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
@ 2019-04-05 10:57   ` Michal Simek
  2019-04-09  6:04   ` Heiko Schocher
  1 sibling, 0 replies; 9+ messages in thread
From: Michal Simek @ 2019-04-05 10:57 UTC (permalink / raw)
  To: u-boot

On 05. 04. 19 12:32, Luca Ceresoli wrote:
> The chip_desc.enable field is used only for muxes, not tor switches.

typo tor.

M

> Document it and remove the unused values.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  drivers/i2c/muxes/pca954x.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
> index bd4e9abe5f3c..5669753ce14d 100644
> --- a/drivers/i2c/muxes/pca954x.c
> +++ b/drivers/i2c/muxes/pca954x.c
> @@ -22,7 +22,7 @@ enum pca_type {
>  };
>  
>  struct chip_desc {
> -	u8 enable;
> +	u8 enable; /* Enable mask in ctl register (used for muxes only) */
>  	enum muxtype {
>  		pca954x_ismux = 0,
>  		pca954x_isswi,
> @@ -48,12 +48,10 @@ static const struct chip_desc chips[] = {
>  		.width = 8,
>  	},
>  	[PCA9548] = {
> -		.enable = 0x8,
>  		.muxtype = pca954x_isswi,
>  		.width = 8,
>  	},
>  	[PCA9646] = {
> -		.enable = 0x0,
>  		.muxtype = pca954x_isswi,
>  		.width = 4,
>  	},
> 

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

* [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices
  2019-04-05 10:32 [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Luca Ceresoli
  2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
  2019-04-05 10:32 ` [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch Luca Ceresoli
@ 2019-04-05 10:58 ` Michal Simek
  2019-04-05 21:37   ` Luca Ceresoli
  2019-04-09  6:03 ` Heiko Schocher
  3 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2019-04-05 10:58 UTC (permalink / raw)
  To: u-boot

On 05. 04. 19 12:32, Luca Ceresoli wrote:
> The Kconfig help has not been updated while adding PCA9547 and PCA9646.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  drivers/i2c/muxes/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
> index b0da67ce2c6b..26be78f685de 100644
> --- a/drivers/i2c/muxes/Kconfig
> +++ b/drivers/i2c/muxes/Kconfig
> @@ -33,7 +33,7 @@ config I2C_MUX_PCA954x
>  	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
>  	  partitioning I2C bus and connect multiple devices with the same address
>  	  to the same I2C controller where driver handles proper routing to
> -	  target i2c device. PCA9544 and PCA9548 are supported.
> +	  target i2c device. PCA9544, PCA9547 PCA9548 and PCA9646 are supported.

missing comma there.

M

>  
>  config I2C_MUX_GPIO
>          tristate "GPIO-based I2C multiplexer"
> 

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

* [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices
  2019-04-05 10:58 ` [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Michal Simek
@ 2019-04-05 21:37   ` Luca Ceresoli
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Ceresoli @ 2019-04-05 21:37 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On 05/04/19 12:58, Michal Simek wrote:
> On 05. 04. 19 12:32, Luca Ceresoli wrote:
>> The Kconfig help has not been updated while adding PCA9547 and PCA9646.
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> ---
>>  drivers/i2c/muxes/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
>> index b0da67ce2c6b..26be78f685de 100644
>> --- a/drivers/i2c/muxes/Kconfig
>> +++ b/drivers/i2c/muxes/Kconfig
>> @@ -33,7 +33,7 @@ config I2C_MUX_PCA954x
>>  	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
>>  	  partitioning I2C bus and connect multiple devices with the same address
>>  	  to the same I2C controller where driver handles proper routing to
>> -	  target i2c device. PCA9544 and PCA9548 are supported.
>> +	  target i2c device. PCA9544, PCA9547 PCA9548 and PCA9646 are supported.
> 
> missing comma there.

Thank you for your very prompt reviews. I'll wait a few more days in
case of more comments and then resend with the fixes you suggested.

-- 
Luca

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

* [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices
  2019-04-05 10:32 [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Luca Ceresoli
                   ` (2 preceding siblings ...)
  2019-04-05 10:58 ` [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Michal Simek
@ 2019-04-09  6:03 ` Heiko Schocher
  3 siblings, 0 replies; 9+ messages in thread
From: Heiko Schocher @ 2019-04-09  6:03 UTC (permalink / raw)
  To: u-boot

Hello Luca,

Am 05.04.2019 um 12:32 schrieb Luca Ceresoli:
> The Kconfig help has not been updated while adding PCA9547 and PCA9646.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>   drivers/i2c/muxes/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

beside the comments from Michal,

Reviewed-by: Heiko Schocher<hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

* [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field
  2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
  2019-04-05 10:57   ` Michal Simek
@ 2019-04-09  6:04   ` Heiko Schocher
  1 sibling, 0 replies; 9+ messages in thread
From: Heiko Schocher @ 2019-04-09  6:04 UTC (permalink / raw)
  To: u-boot

Hello Luca,

Am 05.04.2019 um 12:32 schrieb Luca Ceresoli:
> The chip_desc.enable field is used only for muxes, not tor switches.
> Document it and remove the unused values.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>   drivers/i2c/muxes/pca954x.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

beside the comment from Michal,

Reviewed-by: Heiko Schocher<hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

* [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch
  2019-04-05 10:32 ` [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch Luca Ceresoli
@ 2019-04-09  6:07   ` Heiko Schocher
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Schocher @ 2019-04-09  6:07 UTC (permalink / raw)
  To: u-boot

Hello Luca,

Am 05.04.2019 um 12:32 schrieb Luca Ceresoli:
> The PCA9543 is a 2-channel I2C switch.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>   drivers/i2c/muxes/Kconfig   | 10 +++++-----
>   drivers/i2c/muxes/pca954x.c |  6 ++++++
>   2 files changed, 11 insertions(+), 5 deletions(-)

Reviewed-by: Heiko Schocher<hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

end of thread, other threads:[~2019-04-09  6:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-05 10:32 [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Luca Ceresoli
2019-04-05 10:32 ` [U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field Luca Ceresoli
2019-04-05 10:57   ` Michal Simek
2019-04-09  6:04   ` Heiko Schocher
2019-04-05 10:32 ` [U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch Luca Ceresoli
2019-04-09  6:07   ` Heiko Schocher
2019-04-05 10:58 ` [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices Michal Simek
2019-04-05 21:37   ` Luca Ceresoli
2019-04-09  6:03 ` Heiko Schocher

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.