summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>2014-12-02 08:49:18 +1300
committerHeiko Schocher <hs@denx.de>2014-12-08 07:27:06 +0100
commit2fe50ef4034b69b45413108dd3e736de2548c04a (patch)
tree29f55f284566e86ef0d20c41465d686877b666ac /drivers/i2c
parent97cdf64026c7d749dd7a5c0dbaba7a60a7292ac9 (diff)
downloadu-boot-imx-2fe50ef4034b69b45413108dd3e736de2548c04a.zip
u-boot-imx-2fe50ef4034b69b45413108dd3e736de2548c04a.tar.gz
u-boot-imx-2fe50ef4034b69b45413108dd3e736de2548c04a.tar.bz2
i2c: Fix deselection of muxes
Due to an uninitialised variable, when muxes were deselected, any value could be written to the mux control register. On the PCA9548, this could result in multiple channels being selected, thus enabling multiple pull-up resistors, and much bus capacitance. The fix is simply to initialise the written value to zero. Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index d34b749..4539667 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -178,7 +178,7 @@ static int i2c_mux_disconnet_all(void)
{
struct i2c_bus_hose *i2c_bus_tmp = &i2c_bus[I2C_BUS];
int i;
- uint8_t buf;
+ uint8_t buf = 0;
if (I2C_ADAP->init_done == 0)
return 0;