diff options
author | Michael Burr <michael.burr@logicpd.com> | 2013-09-23 22:35:45 +0000 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2013-10-17 07:20:25 +0200 |
commit | e66587495d75ad82c34e9f04af03d3c5741644d3 (patch) | |
tree | 1d85f260218908d96c9fc6ed0f4e3ab4ae019db4 /drivers/i2c | |
parent | b089d039b1971fc3abfe1d9bcebd0d35245fb110 (diff) | |
download | u-boot-imx-e66587495d75ad82c34e9f04af03d3c5741644d3.zip u-boot-imx-e66587495d75ad82c34e9f04af03d3c5741644d3.tar.gz u-boot-imx-e66587495d75ad82c34e9f04af03d3c5741644d3.tar.bz2 |
i2c: Zynq: Support for TI PCA9548 bus multiplexer
(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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |