Re: [PATCH v3 13/14] reset: convert reset core to using firmware nodes
From: Geert Uytterhoeven
Date: Tue Mar 10 2026 - 11:31:47 EST
Hi Bartosz,
On Fri, 6 Mar 2026 at 18:30, Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:
> With everything else now in place, we can convert the remaining parts of
> the reset subsystem to becoming fwnode-agnostic - meaning it will work
> with all kinds of firmware nodes, not only devicetree.
>
> To that end: extend struct reset_controller_dev with fields taking
> information relevant for using firmware nodes (which mirrors what we
> already do for OF-nodes) and limit using of_ APIs only to where it's
> absolutely necessary (mostly around the of_xlate callback).
>
> For backward compatibility of existing drivers we still support OF-nodes
> but firmware nodes become the preferred method.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
Thanks for your patch, which is now commit 9035073d0ef1de81 ("reset:
convert reset core to using firmware nodes") in reset/next.
> --- a/drivers/reset/core.c
> +++ b/drivers/reset/core.c
> @@ -951,18 +965,18 @@ static int reset_create_gpio_aux_device(struct reset_gpio_lookup *rgpio_dev,
> return 0;
> }
>
> -static void reset_gpio_add_devlink(struct device_node *np,
> +static void reset_gpio_add_devlink(struct fwnode_handle *fwnode,
> struct reset_gpio_lookup *rgpio_dev)
> {
> struct device *consumer;
>
> /*
> - * We must use get_dev_from_fwnode() and not of_find_device_by_node()
> + * We must use get_dev_from_fwnode() and not ref_find_device_by_node()
ref_find_device_by_node() does not exist. What should it be?
> * because the latter only considers the platform bus while we want to
> * get consumers of any kind that can be associated with firmware
> * nodes: auxiliary, soundwire, etc.
> */
> - consumer = get_dev_from_fwnode(of_fwnode_handle(np));
> + consumer = get_dev_from_fwnode(fwnode);
> if (consumer) {
> if (!device_link_add(consumer, &rgpio_dev->adev.dev,
> DL_FLAG_AUTOREMOVE_CONSUMER))
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds