hwmon: (tmp421) support specifying n-factor via DT
authorKrzysztof Adamski <krzysztof.adamski@nokia.com>
Thu, 14 Oct 2021 13:01:28 +0000 (15:01 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 15 Oct 2021 22:49:32 +0000 (15:49 -0700)
commit3fba10dc0341462a907c2eb31e1dc60b83da23fa
treed81d27b68ebafe5ff20b3394d5bb469e66a6fc46
parent45e9bda4ffc48f96e9811e158dcd610a5ec49e13
hwmon: (tmp421) support specifying n-factor via DT

Previous patches added a way to specify some channel specific parameters
in DT and n-factor is definitely one of them. This calibration mechanism
is board specific as its value depends on the diodes/transistors being
connected to the sensor and thus the DT seems like a right fit for that
information. It is very similar to the value of shunt resistor that some
drivers allows specifying in DT.

This patch adds a possibility to set n-factor for each channel via
"n-factor" DT property in each channel subnode.

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