[PATCH v21 08/13] mfd: core: Add firmware-node support to MFD cells
Bartosz Golaszewski
brgl at kernel.org
Thu Apr 30 05:46:19 PDT 2026
On Wed, Apr 29, 2026 at 6:10 PM Shivendra Pratap
<shivendra.pratap at oss.qualcomm.com> wrote:
>
>
>
> On 29-04-2026 15:20, Bartosz Golaszewski wrote:
> > On Wed, Apr 29, 2026 at 11:46 AM Shivendra Pratap
> > <shivendra.pratap at oss.qualcomm.com> wrote:
> >>
> >>>>
> >>>> If set, it would be called from MFD core and would do the name lookup
> >>>> and return the fwnode which would then be assigned to the cell device?
> >>>
> >>
> >> Or should we just drop this patch for fwnode in mfd-core?
> >>
> >> Export a new call in reboot-mode framework as:
> >> reboot_mode_register_node(struct reboot_mode_driver *reboot,
> >> struct device_node *np / fwnode)
> >>
> >> Use the parent node in psci-reboot-mode and find reboot-mode and call
> >> reboot_mode_register_node?
> >>
> >
> > No, I think the reboot-mode device (as pointed to by the dev field of
> > struct reboot_mode_driver) should be associated with the right fwnode
> > from the start so it should be handled in MFD core.
>
> Ack. something like should be fine?
>
> drivers/mfd/mfd-core.c :
> + if (!pdev->dev.fwnode && cell->get_fwnode) {
> + fwnode = cell->get_fwnode(parent);
> + if (fwnode)
> + device_set_node(&pdev->dev, fwnode);
> + }
>
Possibly we could find a better name, but yeah the general idea is sound.
Of course, let's maybe here from Lee if he's ok before sending a new version.
> drivers/mfd/psci-mfd.c (goes next patch):
> +static struct fwnode_handle *psci_reboot_mode_get_fwnode(struct device
> *parent)
> +{
> + return fwnode_get_named_child_node(dev_fwnode(parent),
> "reboot-mode");
> +}
>
Yes, something like this.
Bart
More information about the linux-arm-kernel
mailing list