aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorNikita Yushchenko2022-02-15 21:10:09 +0300
committerTom Rini2022-02-21 08:39:52 -0500
commita064e0c75fdf63c546a5a0885fa0c58bb1643dac (patch)
tree2763f5af2277548fef0077f7be3a48b87d79b036 /drivers/i2c
parent829b41171b181e083fc984b72bb8acb31c1fb952 (diff)
ti: i2c: fix probe_chip() return value
Per documentation, dm_i2c_ops.probe_chip() shall return -EREMOTEIO if probe fails. Currently, omap_i2c_probe_chip() returns 1 instead. Fix that. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/omap24xx_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index a767dee9866..c656cf8b7a1 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -1015,7 +1015,7 @@ static int omap_i2c_probe_chip(struct udevice *bus, uint chip_addr,
struct omap_i2c *priv = dev_get_priv(bus);
return __omap24_i2c_probe(priv->regs, priv->ip_rev, priv->waitdelay,
- chip_addr);
+ chip_addr) ? -EREMOTEIO : 0;
}
static int omap_i2c_probe(struct udevice *bus)