[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHS9pzHA1xKXlmaJ@smile.fi.intel.com>
Date: Mon, 14 Jul 2025 11:19:51 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Akhil R <akhilrajeev@...dia.com>
Cc: andi.shyti@...nel.org, conor+dt@...nel.org, devicetree@...r.kernel.org,
digetx@...il.com, jonathanh@...dia.com, krzk+dt@...nel.org,
ldewangan@...dia.com, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
p.zabel@...gutronix.de, robh@...nel.org, thierry.reding@...il.com
Subject: Re: [PATCH v6 2/3] i2c: tegra: Use internal reset when reset
property is not available
On Mon, Jul 14, 2025 at 10:52:25AM +0530, Akhil R wrote:
> On Fri, 11 Jul 2025 18:00:45 +0200, Andi Shyti wrote:
...
> >> I would perhaps expand the comment here to explain ENOENT check and what do we
> >> do in this case. (Note, no rewriting of the existing, just adding a paragraph)
> >>
> >> *
> >> * In case ... we compare with -ENOENT ...
> >> * ...
> >> */
> >
> > If you write it here I can expand your comment before merging.
> >
> > Or if you prefer sending a v7 is still fine.
>
> Hi Andi,
>
> I thought to update the comments as below. Please let me know if this can be
> folded in. I can send a v7 if that is easier to merge.
>
> /*
> * Reset the controller before initializing it.
> * In case if device_reset() returns -ENOENT, i.e. when the reset is
> * not available, the internal software reset will be used if it is
> * supported by the controller.
> */
> err = device_reset(i2c_dev->dev);
> if (err == -ENOENT)
> err = tegra_i2c_master_reset(i2c_dev);
>
> /*
> * The reset shouldn't ever fail in practice. The failure will be a
> * sign of a severe problem that needs to be resolved. Still we don't
> * want to fail the initialization completely because this may break
> * kernel boot up since voltage regulators use I2C. Hence, we will
> * emit a noisy warning on error, which won't stay unnoticed and
> * won't hose machine entirely.
> */
> WARN_ON_ONCE(err);
Good for me.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists