diff options
author | Tom Rini <trini@konsulko.com> | 2019-08-27 07:09:10 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-27 07:09:10 -0400 |
commit | e7ce2e04831e8801f8a1e3afc6dee66b4132c48b (patch) | |
tree | 93c4681cd9a1d10264fc6d1cf5e917b26259578b /drivers/misc/i2c_eeprom.c | |
parent | d39221f33f0e78cc80d1304ab4ca4e4a3886fbff (diff) | |
parent | 5ae84860b0428b37063a6d7b03cae26a4e772da7 (diff) |
Merge tag 'for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c bugfixes for 2019.10
- misc: i2c_eeprom: verify that the chip is functional at probe()
- i2c: mxc_i2c: Remove i2c_idle_bus from probe
- i2c-mux-gpio: Fix GPIO request flag issue
Diffstat (limited to 'drivers/misc/i2c_eeprom.c')
-rw-r--r-- | drivers/misc/i2c_eeprom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index f25d054007..8f2349ad5a 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -84,6 +84,14 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev) static int i2c_eeprom_std_probe(struct udevice *dev) { + u8 test_byte; + int ret; + + /* Verify that the chip is functional */ + ret = i2c_eeprom_read(dev, 0, &test_byte, 1); + if (ret) + return -ENODEV; + return 0; } |