From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Linus Walleij <linusw@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/2] driver core: provide device_match_fwnode_ext()
Date: Thu, 19 Feb 2026 16:47:59 -0800 [thread overview]
Message-ID: <aZeu11bBxxgXNMyd@google.com> (raw)
In-Reply-To: <CAMRc=MewpkVkrr-srOzx0iudwOJyrzeBErbF_-BR-oTo5_KyEg@mail.gmail.com>
On Thu, Feb 19, 2026 at 03:15:53PM -0600, Bartosz Golaszewski wrote:
> On Thu, 19 Feb 2026 17:54:24 +0100, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> said:
> > Hi Bartosz,
> >
> > On Thu, Feb 19, 2026 at 05:39:47PM +0100, Bartosz Golaszewski wrote:
> >> On Thu, Feb 19, 2026 at 5:36 PM Greg Kroah-Hartman
> >> <gregkh@linuxfoundation.org> wrote:
> >> >
> >> > On Thu, Feb 19, 2026 at 05:31:22PM +0100, Bartosz Golaszewski wrote:
> >> > > Provide an extended variant of device_match_fwnode() that also tries to
> >> > > match the device's secondary fwnode.
> >> > >
> >> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> >> > > ---
> >> > > drivers/base/core.c | 14 ++++++++++++++
> >> > > include/linux/device/bus.h | 1 +
> >> > > 2 files changed, 15 insertions(+)
> >> > >
> >> > > diff --git a/drivers/base/core.c b/drivers/base/core.c
> >> > > index f599a1384eec90c104601422b04dc2b4c19d4382..bbf1337978fafc35eb94bda85e0bb7f6879879c0 100644
> >> > > --- a/drivers/base/core.c
> >> > > +++ b/drivers/base/core.c
> >> > > @@ -5326,6 +5326,20 @@ int device_match_fwnode(struct device *dev, const void *fwnode)
> >> > > }
> >> > > EXPORT_SYMBOL_GPL(device_match_fwnode);
> >> > >
> >> > > +int device_match_fwnode_ext(struct device *dev, const void *fwnode)
> >> >
> >> > No kernel doc to explain what this function does?
> >> >
> >> > :(
> >> >
> >>
> >> It's not like any of the other variants from this file were documented
> >> but ok, I can add it in v2. Still, I'd like to hear if this even makes
> >> sense.
> >
> > I think it really needs a good explanation given how it goes through
> > secondaries on one side but not on the other (but maybe it should? Why
> > one would not want to match secondary?)
> >
>
> I don't think it should. You have one, concrete fwnode and you want to match
> it against a struct device: in this variant both its primary and secondary
> nodes. I don't think we should do a four-way matching.
I wonder why you consider these 2 distinct fwnodes instead of a single
object that has multiple components? After all in device we have a
pointer to fwnode, and not list of fwnodes....
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-02-20 0:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 16:31 [PATCH 0/2] driver core: provide and use device_match_fwnode_ext() Bartosz Golaszewski
2026-02-19 16:31 ` [PATCH 1/2] driver core: provide device_match_fwnode_ext() Bartosz Golaszewski
2026-02-19 16:36 ` Greg Kroah-Hartman
2026-02-19 16:39 ` Bartosz Golaszewski
2026-02-19 16:50 ` Greg Kroah-Hartman
2026-02-19 16:54 ` Dmitry Torokhov
2026-02-19 21:15 ` Bartosz Golaszewski
2026-02-20 0:47 ` Dmitry Torokhov [this message]
2026-02-20 7:27 ` Andy Shevchenko
2026-02-20 11:06 ` Bartosz Golaszewski
2026-02-19 16:55 ` Danilo Krummrich
2026-02-19 19:27 ` Andy Shevchenko
2026-02-19 21:18 ` Bartosz Golaszewski
2026-02-20 0:21 ` Danilo Krummrich
2026-02-20 7:42 ` Andy Shevchenko
2026-02-20 11:21 ` Bartosz Golaszewski
2026-02-19 21:16 ` Bartosz Golaszewski
2026-02-19 19:58 ` Andy Shevchenko
2026-02-19 21:21 ` Bartosz Golaszewski
2026-02-20 7:36 ` Andy Shevchenko
2026-02-20 11:25 ` Bartosz Golaszewski
2026-02-20 12:08 ` Rafael J. Wysocki
2026-02-20 14:35 ` Bartosz Golaszewski
2026-02-20 14:49 ` Andy Shevchenko
2026-02-20 14:55 ` Rafael J. Wysocki
2026-02-20 15:43 ` Danilo Krummrich
2026-02-20 16:03 ` Rafael J. Wysocki
2026-02-19 16:31 ` [PATCH 2/2] gpiolib: use device_match_fwnode_ext() Bartosz Golaszewski
2026-02-19 17:32 ` [PATCH 0/2] driver core: provide and " Linus Walleij
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=aZeu11bBxxgXNMyd@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.