Re: [PATCH v6 05/23] mailbox: Allow controller specific mapping using fwnode

From: Anup Patel
Date: Tue Jul 01 2025 - 02:50:42 EST


On Mon, Jun 23, 2025 at 2:15 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Wed, Jun 18, 2025 at 05:43:40PM +0530, Anup Patel wrote:
> > Introduce optional fw_node() callback which allows a mailbox controller
> > driver to provide controller specific mapping using fwnode.
> >
> > The Linux OF framework already implements fwnode operations for the
> > Linux DD framework so the fw_xlate() callback works fine with device
> > tree as well.
>
> ...
>
> > + fwnode = dev_fwnode(dev);
> > + if (!fwnode) {
> > + dev_dbg(dev, "No owner fwnode\n");
> > + return ERR_PTR(-ENODEV);
> > + }
> > +
> > + ret = fwnode_property_get_reference_args(dev_fwnode(dev), "mboxes",
>
> Why not using fwnode directly here?

Argh, I missed replacing dev_fwnode() over here. Thanks for catching it,
I will update in the next revision.

>
> > + "#mbox-cells", 0, index, &fwspec);
> > if (ret) {
> > - dev_err(dev, "%s: can't parse \"mboxes\" property\n", __func__);
> > + dev_err(dev, "%s: can't parse \"%s\" property\n", __func__, "mboxes");
> > return ERR_PTR(ret);
> > }
>
> ...
>
> Otherwise looks like a good solution to get rid of OF-centric code from mailbox
> in the future.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Thanks,
Anup