public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Akhil R <akhilrajeev@nvidia.com>
Cc: andriy.shevchenko@linux.intel.com, andi.shyti@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	digetx@gmail.com, jonathanh@nvidia.com, krzk+dt@kernel.org,
	ldewangan@nvidia.com, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	p.zabel@pengutronix.de, robh@kernel.org,
	thierry.reding@gmail.com
Subject: Re: [PATCH v4 2/3] i2c: tegra: make reset an optional property
Date: Thu, 12 Jun 2025 21:43:56 +0300	[thread overview]
Message-ID: <aEsf7Ml__JE1ixQX@surfacebook.localdomain> (raw)
In-Reply-To: <20250612153338.68829-1-akhilrajeev@nvidia.com>

Thu, Jun 12, 2025 at 09:03:38PM +0530, Akhil R kirjoitti:
> On Thu, 12 Jun 2025 15:55:21 +0300, Andy Shevchenko wrote:

...

> >> >     if (handle)
> >> >             err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
> >> > -   else
> >> > +   else if (i2c_dev->rst)
> >> >             err = reset_control_reset(i2c_dev->rst);
> >> > +   else
> >> > +           err = tegra_i2c_master_reset(i2c_dev);
> >>
> >> Can you please take a look here? Should the reset happen in ACPI?
> >
> > This is a good question. Without seeing all the implementations of _RST method
> > for the platforms based on this SoC it's hard to say. Ideally the _RST (which
> > is called above) must handle it properly, but firmwares have bugs...
> >
> > TL;DR: I think the approach is correct, and if any bug in ACPI will be found,
> > the workaround (quirk) needs to be added here later on.
> 
> As in Thierry's comment, I was in thought of updating the code as below.
> Does it make sense or would it be better keep what it is there now?
> 
> if (handle && acpi_has_method(handle, "_RST"))
> 	err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
> else if (i2c_dev->rst)
> 	err = reset_control_reset(i2c_dev->rst);
> else
> 	err = tegra_i2c_master_reset(i2c_dev);

This will change current behaviour for the ACPI based platforms that do not
have an _RST method. At bare minumum this has to be elaborated in the commit
message with an explanation why it's not a probnlem.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-06-12 18:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 15:30 [PATCH v4 1/3] dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties Akhil R
2025-06-03 15:30 ` [PATCH v4 2/3] i2c: tegra: make reset an optional property Akhil R
2025-06-10  8:32   ` Thierry Reding
2025-06-10  9:51     ` Akhil R
2025-06-10  9:56       ` Thierry Reding
2025-06-12  0:57   ` Andi Shyti
2025-06-12 12:55     ` Andy Shevchenko
2025-06-12 15:33       ` Akhil R
2025-06-12 18:43         ` Andy Shevchenko [this message]
2025-06-13  6:00           ` Akhil R
2025-06-13  7:00             ` Andy Shevchenko
2025-06-03 15:30 ` [PATCH v4 3/3] i2c: tegra: Remove dma_sync_*() calls Akhil R
2025-06-10  8:03   ` Thierry Reding
2025-06-03 19:00 ` [PATCH v4 1/3] dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties Krzysztof Kozlowski
2025-06-09  9:02   ` Akhil R
2025-06-10  8:09     ` Krzysztof Kozlowski
2025-06-12  0:59 ` Andi Shyti

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=aEsf7Ml__JE1ixQX@surfacebook.localdomain \
    --to=andy.shevchenko@gmail.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    /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