diff mbox series

[U-Boot,3/3] i2c: muxes: pca954x: support PCA9543 I2C switch

Message ID 20190405103224.16223-3-luca@lucaceresoli.net
State Superseded
Delegated to: Heiko Schocher
Headers show
Series [U-Boot,1/3] i2c: muxes: pca954x: update list of supported devices | expand

Commit Message

Luca Ceresoli April 5, 2019, 10:32 a.m. UTC
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(-)

Comments

Heiko Schocher April 9, 2019, 6:07 a.m. UTC | #1
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
diff mbox series

Patch

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 },