diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-10 07:16:33 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-10 07:16:33 -0500 |
commit | 7ff485c68b7e5573e5a4a877066e98398283a24f (patch) | |
tree | 8070ad8de0b18240ee67e1c8b847afc37bdb2d5d /drivers/i2c/i2c-uclass.c | |
parent | 7504e9e75f76a5101b47cd32851ad7bd4ea8ff70 (diff) | |
parent | 19f8c4dfb6e744a31da59bdd23b24d144152f1dc (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-i2c
- DM_I2C_COMPAT removal for all ti platforms from Jean-Jacques Hiblot
- Fix in i2c command help output from Chirstoph Muellner.
Diffstat (limited to 'drivers/i2c/i2c-uclass.c')
-rw-r--r-- | drivers/i2c/i2c-uclass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index c5a3c4e2016..975318e5f25 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -347,6 +347,17 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len, debug("Cannot find I2C bus %d\n", busnum); return ret; } + + /* detect the presence of the chip on the bus */ + ret = i2c_probe_chip(bus, chip_addr, 0); + debug("%s: bus='%s', address %02x, ret=%d\n", __func__, bus->name, + chip_addr, ret); + if (ret) { + debug("Cannot detect I2C chip %02x on bus %d\n", chip_addr, + busnum); + return ret; + } + ret = i2c_get_chip(bus, chip_addr, offset_len, devp); if (ret) { debug("Cannot find I2C chip %02x on bus %d\n", chip_addr, |