Re: [PATCH v21 08/13] mfd: core: Add firmware-node support to MFD cells

From: Shivendra Pratap

Date: Tue Apr 28 2026 - 08:23:50 EST




On 28-04-2026 13:33, Bartosz Golaszewski wrote:
On Mon, 27 Apr 2026 19:34:48 +0200, Shivendra Pratap
<shivendra.pratap@xxxxxxxxxxxxxxxx> said:
MFD core has no way to register a child device using an explicit firmware
node. This prevents drivers from registering child nodes when those nodes
do not define a compatible string. One such example is the PSCI
"reboot-mode" node, which omits a compatible string as it describes
boot-states provided by the underlying firmware.

Extend struct mfd_cell with an optional fwnode pointer and attach it to the
child device during registration when no firmware node is already assigned.

Signed-off-by: Shivendra Pratap <shivendra.pratap@xxxxxxxxxxxxxxxx>
---

In the following patch you use this and violate the supposed constness of
MFD cells. This also mean you need to modify the mfd_cell at run-time. I would
prefer introducing a field in mfd_cell: bool use_parent_fwnode which would
indicate to MFD core that - in case no fwnode was assigned from other sources:
DT or software node - it should reuse the parent MFD device's node.

Have one doubt on this, When we fallback to use_parent_fwnode for cell: psci-reboot-mode, at psci_reboot_mode_probe(), pDev->dev->of_node point to psci node.

But we want dev->of_node to point to "reboot-mode" node. This may need an explicit assignment again of of_node?

thanks,
Shivendra