Re: [PATCH v22 08/13] mfd: core: Add firmware-node support to MFD cells
From: Shivendra Pratap
Date: Mon May 25 2026 - 05:34:36 EST
On 22-05-2026 14:38, Bartosz Golaszewski wrote:
On Thu, May 21, 2026 at 6:27 PM Lee Jones <lee@xxxxxxxxxx> wrote:
On Thu, 21 May 2026, Bartosz Golaszewski wrote:
On Thu, May 21, 2026 at 3:24 PM Lee Jones <lee@xxxxxxxxxx> wrote:
I suggested it because of its flexibility. The alternative I had in
mind is something like a new field in mfd_cell:
const char *cell_node_name;
Which - if set - would tell MFD to look up an fwnode that's a child of
the parent device's node by name - as it may not have a compatible.
Remind me why the chlid device can't look-up its own fwnode?
Oh sure it can, but should it? I'm not sure it's logically sound to
have the child device reach into the parent, look up the fwnode and
then assign it to itself after it's already attached to the driver.
This should be done at the subsystem level before the device is
registered.
Leaf drivers reach back into the parent all the time.
But drivers don't generally assign firmware nodes to devices they are
already bound to. This is racy as in probe() the device is already
visible to the system. There's no synchronization of device property
access - properties are assumed to be read-only for a registered
device.
thanks Bart/Lee. Any pointers to take this from here?
thanks,
Shivendra