From: Andreas Dannenberg Date: Tue, 7 Jan 2020 07:45:53 +0000 (+0530) Subject: ti: common: board_detect: Handle EEPROM probe more gracefully X-Git-Tag: v2025.01-rc5-pxa1908~2598^2~31 X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=499681e15e7e7afcae78bdc100d6a753f9271094;p=u-boot.git ti: common: board_detect: Handle EEPROM probe more gracefully Use dm_i2c_probe() rather than i2c_get_chip() when trying to access board-detection EEPROM devices. This has the advantage of more gracefully handling the case when the EEPROM is not present by allowing to exit the function early rather than failing and outputting an error message on the I2C transactions that follow. Signed-off-by: Andreas Dannenberg Signed-off-by: Lokesh Vutla --- diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 59ec57062d..b230bb6f8d 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -94,7 +94,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus); if (rc) return rc; - rc = i2c_get_chip(bus, dev_addr, 1, &dev); + rc = dm_i2c_probe(bus, dev_addr, 0, &dev); if (rc) return rc;