diff options
author | Simon Glass <sjg@chromium.org> | 2024-08-11 08:50:46 -0600 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2024-08-13 06:23:05 +0200 |
commit | 7fca1ae860c1ecab23ae97cc5acfd6cd02b5e74c (patch) | |
tree | ce421c42a1e7768ff52676335dae17c3e7cb5537 /drivers/i2c | |
parent | a48ecabaea28791669ce30e57a5623e9d809ba55 (diff) |
i2c: Remove CFG_SYS_I2C_MAX_HOPS
Now that this is always 0, remove it and the associated dead code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c_core.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c index 7c43a5546d3..f371d952af5 100644 --- a/drivers/i2c/i2c_core.c +++ b/drivers/i2c/i2c_core.c @@ -111,23 +111,6 @@ static int i2c_mux_set_all(void) struct i2c_bus_hose *i2c_bus_tmp = &i2c_bus[I2C_BUS]; int i; - /* Connect requested bus if behind muxes */ - if (i2c_bus_tmp->next_hop[0].chip != 0) { - /* Set all muxes along the path to that bus */ - for (i = 0; i < CFG_SYS_I2C_MAX_HOPS; i++) { - int ret; - - if (i2c_bus_tmp->next_hop[i].chip == 0) - break; - - ret = i2c_mux_set(I2C_ADAP, - i2c_bus_tmp->next_hop[i].mux.id, - i2c_bus_tmp->next_hop[i].chip, - i2c_bus_tmp->next_hop[i].channel); - if (ret != 0) - return ret; - } - } return 0; } @@ -140,26 +123,6 @@ static int i2c_mux_disconnect_all(void) if (I2C_ADAP->init_done == 0) return 0; - /* Disconnect current bus (turn off muxes if any) */ - if ((i2c_bus_tmp->next_hop[0].chip != 0) && - (I2C_ADAP->init_done != 0)) { - i = CFG_SYS_I2C_MAX_HOPS; - do { - uint8_t chip; - int ret; - - chip = i2c_bus_tmp->next_hop[--i].chip; - if (chip == 0) - continue; - - ret = I2C_ADAP->write(I2C_ADAP, chip, 0, 0, &buf, 1); - if (ret != 0) { - printf("i2c: mux disconnect error\n"); - return ret; - } - } while (i > 0); - } - return 0; } #endif |