hwmon: (tmp401) Add support of three advanced features
authorCamel Guo <camel.guo@axis.com>
Thu, 14 Apr 2022 07:58:23 +0000 (09:58 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 20 May 2022 17:57:05 +0000 (10:57 -0700)
commitbd79021072ac841e73ec5300a4dbfbdeff431582
tree51b6991d90fe57319f36ddd69a0ee737c87a5406
parentbd90c5b939502136ae95005e470914e935a548bc
hwmon: (tmp401) Add support of three advanced features

tmp401 driver supports TMP401, TMP411 and TMP43X temperature sensors.
According to their datasheet:
- all of them support extended temperature range feature;
- TMP411 and TPM43X support n-factor correction feature;
- TMP43X support beta compensation feature.

In order to support setting them during bootup, this commit reads
ti,extended-range-enable, ti,n-factor and ti,beta-compensation and set
the corresponding registers during probing.

Signed-off-by: Camel Guo <camel.guo@axis.com>
Link: https://lore.kernel.org/r/20220414075824.2634839-3-camel.guo@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp401.c