Re: [PATCH v3 1/9] firmware: arm_scmi: Set fwnode for the generated SCMI platform device
Jonathan Cameron <[email protected]>
| Newsgroups | org.infradead.lists.linux-arm-kernel,org.kernel.vger.arm-scmi |
|---|---|
| Organization | Qualcomm |
| Message-ID | <[email protected]> |
On Thu, 13 Aug 2026 12:32:56 +0100 Sudeep Holla <[email protected]> wrote: > Add a call to device_set_node() in the SCMI probe helper to associate > generated SCMI platform device with the firmware node of its supplier > transport device. > > This complements device_set_of_node_from_dev() and ensures that > firmware node information is propagated correctly for both Device Tree > and non-DT (e.g. ACPI) based systems. Hi Sudeep, When you say 'complement' I'd like to see a little more. The guts of both calls includes setting dev->ofnode() adn the extra bit in device_set_of_node_from_dev() is about ensuring we drop existing node reference (there isn't one) and increment the reference for what is the parent of_node. I may be wrong, but I think that is unnecessary and if I'm wrong I'd like to see more info here on why it is needed. Also, if this is commonly needed why doesn't device_set_node() include that dance? Unless I fumbled the command, a grep suggests there are no instances in tree of these both being called near each other. Jonathan > > Signed-off-by: Sudeep Holla <[email protected]> > --- > drivers/firmware/arm_scmi/common.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h > index fe8c22cfb9f7..cc7d11c3c1f3 100644 > --- a/drivers/firmware/arm_scmi/common.h > +++ b/drivers/firmware/arm_scmi/common.h > @@ -650,6 +650,7 @@ static int __tag##_probe(struct platform_device *pdev) \ > } \ > \ > device_set_of_node_from_dev(&spdev->dev, dev); \ > + device_set_node(&spdev->dev, dev_fwnode(dev)); \ > \ > strans.supplier = supplier; \ > memcpy(&strans.desc, &(__desc), sizeof(strans.desc)); \ >