Re: [PATCHv2 3/6] hwmon: (socfpga) Add hardware monitoring support on SoCFPGA platforms

From: Dinh Nguyen
Date: Thu May 25 2023 - 17:20:22 EST


Hi Krzysztof,

On 5/9/2023 1:57 AM, Krzysztof Kozlowski wrote:
On 08/05/2023 23:28, dinh.nguyen@xxxxxxxxxxxxxxx wrote:
From: Dinh Nguyen <dinh.nguyen@xxxxxxxxxxxxxxx>

The driver supports 64-bit SoCFPGA platforms for temperature and voltage
reading using the platform's SDM(Secure Device Manager). The driver
also uses the Stratix10 Service layer driver.

This driver only supports OF SoCFPGA 64-bit platforms.

(...)

+static int socfpga_probe_child_from_dt(struct device *dev,
+ struct device_node *child,
+ struct socfpga_hwmon_priv *priv)
+{
+ struct device_node *grandchild;
+ const char *label;
+ const char *type;
+ u32 val;
+ int ret;
+
+ if (of_property_read_string(child, "name", &type))
+ return dev_err_probe(dev, -EINVAL, "No type for %pOF\n", child);
+
+ for_each_child_of_node(child, grandchild) {
+ ret = of_property_read_u32(grandchild, "reg", &val);
+ if (ret)
+ return dev_err_probe(dev, ret, "missing reg property of %pOF\n",
+ grandchild);
Where do you drop child reference?

Not sure what you mean here? Can you clarify?

Thanks,

Dinh