Re: [PATCH v2 04/10] hwmon: (tmp421) add support for defining labels from DT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dnia Fri, Sep 24, 2021 at 05:17:06AM -0700, Guenter Roeck napisał(a):
+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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux