Message ID | 20220215181009.3817704-1-nikita.yoush@cogentembedded.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | ti: i2c: fix probe_chip() return value | expand |
Hello Nikita, On 15.02.22 19:10, Nikita Yushchenko wrote: > 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> > --- > drivers/i2c/omap24xx_i2c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Good catch! Reviewed-by: Heiko Schocher <hs@denx.de> bye, Heiko
On Tue, Feb 15, 2022 at 09:10:09PM +0300, Nikita Yushchenko wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index a767dee986..0e149dcb0b 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)
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> --- drivers/i2c/omap24xx_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)