Re: [PATCH] reset: don't overwrite fwnode_reset_n_cells

From: Geert Uytterhoeven

Date: Tue Mar 10 2026 - 11:54:17 EST


Hi Bartosz,

Hi Bartosz,

Thanks for your patch!

On Tue, 10 Mar 2026 at 16:15, Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:
> Fix a logic bug in reser_register() where we set fwnode_reset_n_cells to

One more non-existing function ;-)

reset_controller_register()

> 1 if fwnode is set and fwnode_xlate is not but we do it after assigning
> of_fwnode_handle(of_node) to fwnode.
>
> Modify the logic to: assign fwnode from of_node if applicable, if fwnode
> is still not set, try to get it from the device and only then check
> of_xlate and fwnode_xlate and either assign fwnode_reset_n_cells from OF
> or default to fwnode_reset_simple_xlate and fwnode_reset_n_cells = 1.
>
> Fixes: ba8dbbb14b7e ("reset: convert the core API to using firmware nodes")
> Reported-by: Mark Brown <broonie@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/0b72286b-33dd-4bc9-8c0e-161c2f4baed8@xxxxxxxxxxxxx/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>

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