public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org,
	Andi Shyti <andi.shyti@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFT 1/2] i2c: rcar: reset controller is mandatory for Gen3+
Date: Tue, 19 Sep 2023 11:19:39 +0200	[thread overview]
Message-ID: <ZQlnq4pYp9ZCu0Zs@shikoro> (raw)
In-Reply-To: <CAMuHMdX8Ug6sQX97_CyFbpAN1Emp7d891wJAWg8pLpnM3q+ysQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]

Hi Geert,

> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks!

> > +               priv->flags &= ~ID_P_NO_RXDMA;
> > +               ret = rcar_i2c_do_reset(priv);
> > +               if (ret)
> > +                       priv->flags |= ID_P_NO_RXDMA;
> 
> This is pre-existing, but if rcar_i2c_do_reset() returns an error,
> that means the I2C block couldn't get out of reset.  Are we sure we
> can still do PIO transfers in that case, or should this be considered
> a fatal error?

Makes sense. I will double check what to do here.

> > +               ret = reset_control_status(priv->rstc);
> > +               if (ret < 0)
> > +                       return ret;
> 
> This is a pre-existing check, but do you really need it?
> This condition will be true if the reset is still asserted, which
> could happen due to some glitch, or force-booting into a new kernel
> using kexec.  And AFAIUI, that should be resolved by the call to
> rcar_i2c_do_reset() above.

This check is needed to ensure reset_control_status() really works
because we need it in rcar_i2c_do_reset(). From the docs:

"reset_control_status - returns a negative errno if not supported,..."

The code only checks for that, not for the status of the reset line.

All the best,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-09-19  9:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  6:29 [PATCH RFT 0/2] i2c: rcar: improve Gen3 support Wolfram Sang
2023-09-13  6:29 ` [PATCH RFT 1/2] i2c: rcar: reset controller is mandatory for Gen3+ Wolfram Sang
2023-09-19  8:46   ` Geert Uytterhoeven
2023-09-19  9:19     ` Wolfram Sang [this message]
2023-09-19  9:27       ` Geert Uytterhoeven
2023-09-13  6:29 ` [PATCH RFT 2/2] i2c: rcar: improve accuracy for R-Car Gen3+ Wolfram Sang
2023-09-18 14:44   ` Geert Uytterhoeven
2023-09-19  9:14   ` Geert Uytterhoeven
2023-09-19  9:32     ` Geert Uytterhoeven
2023-09-19  9:36     ` Wolfram Sang
2023-09-19  9:42   ` Geert Uytterhoeven
2023-09-19  9:44     ` Geert Uytterhoeven
2023-09-19  9:30 ` [PATCH RFT 0/2] i2c: rcar: improve Gen3 support Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZQlnq4pYp9ZCu0Zs@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andi.shyti@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox