[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8ueqegA0Rpxwus2SUH_HVeVpPj2xDf1O7QACBEO9o71PQ@mail.gmail.com>
Date: Sun, 22 Dec 2024 04:16:33 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>,
Prabhakar <prabhakar.csengg@...il.com>, Chris Brandt <chris.brandt@...esas.com>,
Andi Shyti <andi.shyti@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>,
Wolfram Sang <wsa@...nel.org>, Geert Uytterhoeven <geert+renesas@...der.be>,
linux-renesas-soc@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH v2 8/9] i2c: riic: Add `riic_bus_barrier()` to check bus availability
Hi Wolfram,
Thank you for the review.
On Fri, Dec 20, 2024 at 9:27 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
>
> On Wed, Dec 18, 2024 at 12:16:17AM +0000, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Introduce a new `riic_bus_barrier()` function to verify bus availability
> > before initiating an I2C transfer. This function enhances the bus
> > arbitration check by ensuring that the SDA and SCL lines are not held low,
> > in addition to checking the BBSY flag using `readb_poll_timeout()`.
> >
> > Previously, only the BBSY flag was checked to determine bus availability.
> > However, it is possible for the SDA line to remain low even when BBSY = 0.
> > This new implementation performs an additional check on the SDA and SCL
> > lines to avoid potential bus contention issues.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> ...
>
> > - if (riic_readb(riic, RIIC_ICCR2) & ICCR2_BBSY) {
> > - riic->err = -EBUSY;
> > + riic->err = riic_bus_barrier(riic);
> > + if (riic->err)
> > goto out;
> > - }
> >
> > reinit_completion(&riic->msg_done);
> > riic->err = 0;
>
> This initialization can go now. err is 0 already.
>
Agreed, I will fix that in the v3.
> With that fixed:
>
> Reviewed-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
>
Cheers,
Prabhakar
Powered by blists - more mailing lists