public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] i2c: Zynq: Support for TI PCA9548 bus multiplexer
@ 2013-09-23 22:35 Michael Burr
  2013-10-17  6:41 ` [U-Boot] " Heiko Schocher
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Burr @ 2013-09-23 22:35 UTC (permalink / raw)
  To: u-boot

 (Interface is not quite the same as Phillips PCA9547.)

Signed-off-by: Michael Burr <michael.burr@logicpd.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <monstr@monstr.eu>
---
 drivers/i2c/i2c_core.c |    5 +++++
 include/i2c.h          |    2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index d1072e8..b263562 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -138,6 +138,11 @@ static int i2c_mux_set(struct i2c_adapter *adap, int mux_id, int chip,
 			return -1;
 		buf = (uint8_t)((channel & 0x07) | (1 << 3));
 		break;
+	case I2C_MUX_PCA9548_ID:
+		if (channel > 7)
+			return -1;
+		buf = (uint8_t)(0x01 << channel);
+		break;
 	default:
 		printf("%s: wrong mux id: %d\n", __func__, mux_id);
 		return -1;
diff --git a/include/i2c.h b/include/i2c.h
index 8fd17d1..c1be533 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -135,6 +135,8 @@ extern struct i2c_bus_hose	i2c_bus[];
 #define I2C_MUX_PCA9544		{I2C_MUX_PCA9544_ID, "PCA9544A"}
 #define I2C_MUX_PCA9547_ID	4
 #define I2C_MUX_PCA9547		{I2C_MUX_PCA9547_ID, "PCA9547A"}
+#define I2C_MUX_PCA9548_ID	5
+#define I2C_MUX_PCA9548		{I2C_MUX_PCA9548_ID, "PCA9548"}
 #endif
 
 #ifndef I2C_SOFT_DECLARATIONS
-- 
1.7.9.5

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

* [U-Boot] i2c: Zynq: Support for TI PCA9548 bus multiplexer
  2013-09-23 22:35 [U-Boot] [PATCH] i2c: Zynq: Support for TI PCA9548 bus multiplexer Michael Burr
@ 2013-10-17  6:41 ` Heiko Schocher
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Schocher @ 2013-10-17  6:41 UTC (permalink / raw)
  To: u-boot

Hello Michael,

Am 24.09.2013 00:35, schrieb Michael Burr:
> (Interface is not quite the same as Phillips PCA9547.)
>
> Signed-off-by: Michael Burr<michael.burr@logicpd.com>
> Cc: Heiko Schocher<hs@denx.de>
> Cc: Michal Simek<monstr@monstr.eu>
>
> ---
> drivers/i2c/i2c_core.c |    5 +++++
>   include/i2c.h          |    2 ++
>   2 files changed, 7 insertions(+)

Applied to u-boot-i2c.git

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

end of thread, other threads:[~2013-10-17  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 22:35 [U-Boot] [PATCH] i2c: Zynq: Support for TI PCA9548 bus multiplexer Michael Burr
2013-10-17  6:41 ` [U-Boot] " Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox