* [PATCH] ti: i2c: fix probe_chip() return value
@ 2022-02-15 18:10 Nikita Yushchenko
2022-02-16 5:29 ` Heiko Schocher
2022-02-21 16:40 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Nikita Yushchenko @ 2022-02-15 18:10 UTC (permalink / raw)
To: Heiko Schocher; +Cc: u-boot, Nikita Yushchenko
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(-)
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)
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ti: i2c: fix probe_chip() return value
2022-02-15 18:10 [PATCH] ti: i2c: fix probe_chip() return value Nikita Yushchenko
@ 2022-02-16 5:29 ` Heiko Schocher
2022-02-21 16:40 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2022-02-16 5:29 UTC (permalink / raw)
To: Nikita Yushchenko; +Cc: u-boot
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
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ti: i2c: fix probe_chip() return value
2022-02-15 18:10 [PATCH] ti: i2c: fix probe_chip() return value Nikita Yushchenko
2022-02-16 5:29 ` Heiko Schocher
@ 2022-02-21 16:40 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-02-21 16:40 UTC (permalink / raw)
To: Nikita Yushchenko; +Cc: Heiko Schocher, u-boot
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
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!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-21 16:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 18:10 [PATCH] ti: i2c: fix probe_chip() return value Nikita Yushchenko
2022-02-16 5:29 ` Heiko Schocher
2022-02-21 16:40 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.