Re: [PATCH RFT] driver core: faux: allow to set the firmware node for a faux device
From: Greg Kroah-Hartman
Date: Thu Mar 12 2026 - 11:30:25 EST
On Tue, Mar 10, 2026 at 02:18:36PM +0100, Bartosz Golaszewski wrote:
> On Tue, Mar 10, 2026 at 1:43 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Tue, Mar 10, 2026 at 01:29:53PM +0100, Bartosz Golaszewski wrote:
> > > On a completely unrelated note though - Greg: I think this patch could
> > > still be considered because we now have quite a lot of functionality
> > > put into software nodes and already have some auxiliary devices that
> > > use software nodes as a source of device properties/config using the
> > > same API as platform devices (fwnode). I think faux devices could also
> > > profit from it and not necessairly use custom struct. If that sounds
> > > good to you, I may convert one or two faux devices and send a series
> > > with actual users of this.
> >
> > I don't understand why a device that has a fwnode would ever be a "faux"
> > device? Why wouldn't that just be a normal platform device?
> >
> > faux devices were created to be not platform devices, to take away the
> > abuse where platform devices were being used because the api was simple
> > and people wanted a device in the tree somewhere, but there was not
> > actually any backing platform device present.
> >
> > So the use of a fwnode here feels very odd to me, what am I missing?
> >
>
> A firmware node can be a dynamic software node created just for that
> faux device to pass to it its configuration instead of using a custom
> platform data structure.
Ah, ok, that makes a bit more sense, but faux devices should not need
any "configuration" passed to it that I can see, as that would imply
some sort of "resource" that it needs, which implies it has some backing
hardware (i.e. a platform device) :)
Maybe I'm just missing something here, have a real example (other than
this one, which everyone seems confused about) that would need this?
thanks,
greg k-h