hwmon: (tmp421) add support for defining labels from DT
authorKrzysztof Adamski <krzysztof.adamski@nokia.com>
Thu, 14 Oct 2021 13:00:49 +0000 (15:00 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 15 Oct 2021 22:44:21 +0000 (15:44 -0700)
commitc1143d1bc5df2be7dafe90bfbc3cd18e9a199724
tree2e1bb6306675a88c0251e01993797bf4dab59575
parentf04ce1e323301d14e5ceedbe651a3649bd64a94f
hwmon: (tmp421) add support for defining labels from DT

tmp42x is a multichannel temperature sensor with several external
channels. Since those channels can be used to connect diodes placed
anywhere in the system, their meaning will vary depending on the
project. For this case, the hwmon framework has an idea of labels which
allows us to assign the meaning to each channel.

The similar concept is already implemented in ina3221 - the label for
each channel can be defined via device tree. See commit a9e9dd9c6de5
("hwmon: (ina3221) Read channel input source info from DT")

This patch adds support for similar feature to tmp421.

Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Link: https://lore.kernel.org/r/dab0fda6ac0e8d7f163c3762a7fb1e595a4d8159.1634206677.git.krzysztof.adamski@nokia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp421.c