Re: [PATCH] reset: gpio: add a devlink between reset-gpio and its consumer

From: Bartosz Golaszewski

Date: Wed Nov 26 2025 - 06:06:10 EST


On Wed, Nov 26, 2025 at 11:38 AM Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote:
>
> [...]
> > > > + consumer = get_dev_from_fwnode(of_fwnode_handle(np));
> > >
> > > If called via __reset_control_get(), this just reconstructs the device
> > > from dev->of_node. I think it would be better to move the linking into
> > > __reset_control_get() and use the passed in consumer device directly.
> > >
> >
> > That would affect all users, do we want this? In most cases they will
> > already have a link with different flags. I don't think this is
> > correct.
>
> Right. We could also pass an optional dev into __of_reset_control_get()
> and then just go
>
> if (gpio_fallback)
> device_link_add(dev, rcdev->dev, DL_FLAG_STATELESS);
>
> at the end.

I think I'll do the conversion to fwnode first and see about adding
this next. I'm facing a different issue that may make it harder to use
devlinks in gpiolib-shared than I expected.

Let's leave this for now.

Bart