Re: [PATCH RFT] driver core: faux: allow to set the firmware node for a faux device

From: Greg Kroah-Hartman

Date: Fri Mar 06 2026 - 08:54:17 EST


On Fri, Mar 06, 2026 at 02:45:56PM +0100, Bartosz Golaszewski wrote:
> Add a new variant of faux_device_create() taking a firmware node handle
> as argument and attaching it to the created faux device. This allows
> users to define and read device properties using the standard property
> accessors.

Why would a faux device have firmware backing? Doesn't that mean it
should be a platform device?

> While at it: order includes in faux.c alphabetically for easier
> maintenance.

Hint, that should be a separate patch, and is never something that I
enforce or require in .c files I maintain :)

> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---
> Hi Shivendra et al!
>
> This patch is related to my response to your reboot-mode patch[1].
>
> You should be able to use the new function like:
>
> faux_device_create_full("psci-reboot-mode", NULL, NULL, NULL, of_fwnode_handle(np));

What is the fwnode handle here for? Why is it required at all? What
resources are involved that would want this?

thanks,

greg k-h