[PATCH v2 11/11] firmware: arm_scmi: Set fwnode for the scmi_device

Saravana Kannan posted 11 patches 2 years, 7 months ago
There is a newer version of this series
[PATCH v2 11/11] firmware: arm_scmi: Set fwnode for the scmi_device
Posted by Saravana Kannan 2 years, 7 months ago
This allows fw_devlink to track and enforce supplier-consumer
dependencies for scmi_device.

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 drivers/firmware/arm_scmi/bus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index 35bb70724d44..1d8a6a8d9906 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/device.h>
+#include <linux/of.h>
 
 #include "common.h"
 
@@ -192,6 +193,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol,
 	scmi_dev->protocol_id = protocol;
 	scmi_dev->dev.parent = parent;
 	scmi_dev->dev.of_node = np;
+	scmi_dev->dev.fwnode = of_fwnode_handle(np);
 	scmi_dev->dev.bus = &scmi_bus_type;
 	scmi_dev->dev.release = scmi_device_release;
 	dev_set_name(&scmi_dev->dev, "scmi_dev.%d", id);
-- 
2.39.1.456.gfc5497dd1b-goog
Re: [PATCH v2 11/11] firmware: arm_scmi: Set fwnode for the scmi_device
Posted by Sudeep Holla 2 years, 7 months ago
On Thu, Jan 26, 2023 at 04:11:38PM -0800, Saravana Kannan wrote:
> This allows fw_devlink to track and enforce supplier-consumer
> dependencies for scmi_device.
>

Is there any dependency in the series, if so

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

after you incorporate Andy's suggestion.

Let me know if you want me to pick this up.

-- 
Regards,
Sudeep
Re: [PATCH v2 11/11] firmware: arm_scmi: Set fwnode for the scmi_device
Posted by Andy Shevchenko 2 years, 7 months ago
On Thu, Jan 26, 2023 at 04:11:38PM -0800, Saravana Kannan wrote:
> This allows fw_devlink to track and enforce supplier-consumer
> dependencies for scmi_device.

...

>  	scmi_dev->dev.of_node = np;
> +	scmi_dev->dev.fwnode = of_fwnode_handle(np);

As per previous patch:

	device_set_node(&scmi_dev->dev, of_fwnode_handle(np));

-- 
With Best Regards,
Andy Shevchenko