mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 01:44:34 +00:00
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>
This commit is contained in:
parent
97cdf64026
commit
2fe50ef403
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue