From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 7/9] reset: make the provider of reset-gpios the parent of the reset device
Date: Wed, 22 Oct 2025 19:11:58 +0300 [thread overview]
Message-ID: <aPkCTgaqPHaTsFDH@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=Md-KuNp1o6GLA0WTbknbN-qtt8YJqy5fJs0P0EyE7KY3Q@mail.gmail.com>
On Wed, Oct 22, 2025 at 02:17:53PM +0200, Bartosz Golaszewski wrote:
> On Wed, Oct 22, 2025 at 10:39 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > On Di, 2025-10-21 at 18:47 +0300, Andy Shevchenko wrote:
> > > On Tue, Oct 21, 2025 at 05:23:33PM +0200, Bartosz Golaszewski wrote:
> > > > On Tue, Oct 21, 2025 at 5:03 PM Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > On Tue, Oct 21, 2025 at 05:55:02PM +0300, Andy Shevchenko wrote:
> > > > > > On Tue, Oct 21, 2025 at 11:39:41AM +0200, Bartosz Golaszewski wrote:
> > > > > > > On Tue, Oct 21, 2025 at 11:31 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > > > > > > > On Di, 2025-10-21 at 11:27 +0200, Bartosz Golaszewski wrote:
[...]
> > > > > > > > No need to convert all existing drivers right away, but I'd like to see
> > > > > > > > a user that benefits from the conversion.
> > > > > > > >
> > > > > > >
> > > > > > > The first obvious user will be the reset-gpio driver which will see
> > > > > > > its core code simplified as we won't need to cast between OF and
> > > > > > > fwnodes.
> > > > > >
> > > > > > +1 to Bart's work. reset-gpio in current form is useless in all my cases
> > > > > > (it's OF-centric in 2025! We should not do that in a new code).
> > > > > >
> > > > > > More over, conversion to reset-gpio from open coded GPIO APIs is a clear
> > > > > > regression and I want to NAK all those changes (if any already done) for
> > > > > > the discrete components that may be used outside of certainly OF-only niche of
> > > > > > the platforms.
> > > > >
> > > > > To be clear, the conversion that's done while reset-gpio is kept OF-centric.
> > > > > I'm in favour of using it, but we need to make it agnostic.
> > > >
> > > > As of now, the whole reset framework is completely OF-centric, I don't
> > > > know what good blocking any such conversions would bring? I intend to
> > > > convert the reset core but not individual drivers.
> > >
> > > Blocking making new regressions?
> > >
> > > Otherwise as long as reset framework and reset-gpio are agnostic, I'm pretty
> > > much fine with the idea and conversion.
> >
> > I think we might be talking about different "conversions" and different
> > "blocking" here?
> >
> > 1) Conversion of the reset core from of_node to fwnode.
> > 2) Conversion of reset controller drivers from of_node to fwnode.
> > 3) Conversion of consumer drivers from gpiod to reset_control API.
> >
> > My understanding is:
> >
> > Bartosz would like to convert the reset core to fwnode (1) but not
> > convert all the individual reset controller drivers (2). He doesn't
> > like blocking (1) - this statement was partially in reaction to me
> > bringing up a previous attempt that didn't go through.
> >
> > Andy would like to block consumer driver conversions from gpiod to
> > reset_control API (3) while the reset-gpio driver only works on OF
> > platforms.
> >
> > Please correct me if and where I misunderstood.
>
> I think Andy is afraid that people will convert drivers that are used
> in the fwnode world to reset-gpio which only works with OF. I don't
> think that anyone's trying to do it though.
You are both right about my worries and there is of course the case.
https://patch.msgid.link/1720009575-11677-1-git-send-email-shengjiu.wang@nxp.com
The mentioned change should be reverted.
And this was just found by a couple of minutes of `git log --grep`. I am pretty
sure there are handful of a such wrong patches.
Compare to https://patch.msgid.link/20250815172353.2430981-3-mohammad.rafi.shaik@oss.qualcomm.com
which is done correctly (it doesn't break old functionality on non-OF platforms).
> > I think fwnode conversion of the reset controller framework core is a
> > good idea, I'd just like to see a use case accompanying the conversion.
> > It seems like enabling the reset-gpio driver to be used on non-OF
> > platforms could be that. Andy, do you have an actual case in mind?
>
> I'd say converting the reset core to fwnode has merits on its own. We
> should typically use the highest available abstraction layer (which is
> fwnode in this case) unless we absolutely have no choice (for
> instance: using some very OF-specific APIs).
>
> That being said: the reset-gpio driver will be able to work with any
> firmware node once we do the conversion which is a good first
> use-case.
+1, as I already mentioned I am in favour of this change.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-10-22 16:12 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 13:00 [PATCH 0/9] reset: rework reset-gpios handling Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 1/9] software node: read the reference args via the fwnode API Bartosz Golaszewski
2025-10-13 20:05 ` Andy Shevchenko
2025-10-22 7:51 ` Bartosz Golaszewski
2025-10-22 8:24 ` Sakari Ailus
2025-10-22 8:35 ` Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 2/9] software node: increase the reference of the swnode by its fwnode Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 3/9] software node: allow referencing firmware nodes Bartosz Golaszewski
2025-10-13 20:11 ` Andy Shevchenko
2025-10-20 8:06 ` Bartosz Golaszewski
2025-10-20 10:05 ` Andy Shevchenko
2025-10-20 11:26 ` Bartosz Golaszewski
2025-10-21 6:54 ` Sakari Ailus
2025-10-21 9:06 ` Bartosz Golaszewski
2025-10-21 9:14 ` Andy Shevchenko
2025-10-06 13:00 ` [PATCH 4/9] gpio: swnode: don't use the swnode's name as the key for GPIO lookup Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 5/9] gpio: swnode: update the property definitions Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 6/9] reset: order includes alphabetically in reset/core.c Bartosz Golaszewski
2025-10-06 15:20 ` Philipp Zabel
2025-10-06 13:00 ` [PATCH 7/9] reset: make the provider of reset-gpios the parent of the reset device Bartosz Golaszewski
2025-10-06 15:19 ` Philipp Zabel
2025-10-20 15:25 ` Bartosz Golaszewski
2025-10-21 9:17 ` Philipp Zabel
2025-10-21 9:27 ` Bartosz Golaszewski
2025-10-21 9:31 ` Philipp Zabel
2025-10-21 9:39 ` Bartosz Golaszewski
2025-10-21 14:55 ` Andy Shevchenko
2025-10-21 15:03 ` Andy Shevchenko
2025-10-21 15:23 ` Bartosz Golaszewski
2025-10-21 15:47 ` Andy Shevchenko
2025-10-22 8:39 ` Philipp Zabel
2025-10-22 12:17 ` Bartosz Golaszewski
2025-10-22 16:11 ` Andy Shevchenko [this message]
2025-10-20 15:56 ` Bartosz Golaszewski
2025-10-06 13:00 ` [PATCH 8/9] reset: gpio: convert the driver to using the auxiliary bus Bartosz Golaszewski
2025-10-06 15:22 ` Philipp Zabel
2025-10-06 13:00 ` [PATCH 9/9] reset: gpio: use software nodes to setup the GPIO lookup Bartosz Golaszewski
2025-10-06 15:55 ` Philipp Zabel
2025-10-10 14:07 ` Bartosz Golaszewski
2025-10-17 7:12 ` [PATCH 0/9] reset: rework reset-gpios handling Bartosz Golaszewski
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=aPkCTgaqPHaTsFDH@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=dakr@kernel.org \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=shengjiu.wang@nxp.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;
as well as URLs for NNTP newsgroup(s).