Re: [PATCH v2 04/10] hwmon: (tmp421) add support for defining labels from DT
From: Krzysztof Adamski <hidden>
Date: 2021-09-24 12:27:50
Also in:
linux-hwmon
From: Krzysztof Adamski <hidden>
Date: 2021-09-24 12:27:50
Also in:
linux-hwmon
Dnia Fri, Sep 24, 2021 at 05:17:06AM -0700, Guenter Roeck napisał(a):
quoted
+static int tmp421_probe_from_dt(struct i2c_client *client, struct tmp421_data *data) +{ + struct device *dev = &client->dev; + const struct device_node *np = dev->of_node; + struct device_node *child; + int err; + + for_each_child_of_node(np, child) { + err = tmp421_probe_child_from_dt(client, child, data); + if (err) + return err; + }That makes me wonder: Can there ever be other (not temperature channel related) child nodes ? Power, for example ?
For this device? Nothing that could think of that could make sense. But we can be stricter here and skip/ignore all the nodes that are not named input@X, if you think that is reasonable. Krzysztof