]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm90) Reduce maximum conversion rate for G781
authorGuenter Roeck <linux@roeck-us.net>
Thu, 6 Jan 2022 19:48:52 +0000 (11:48 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jan 2022 02:21:27 +0000 (18:21 -0800)
commit62943e96cfe688832216659c551ec195b09ddc81
tree59b14c4a947ff244f9ef3a0552204bcfd34b447d
parent991a5e519c2aa1f4ed2bf6e2139997d7e7967cb3
hwmon: (lm90) Reduce maximum conversion rate for G781

According to its datasheet, G781 supports a maximum conversion rate value
of 8 (62.5 ms). However, chips labeled G781 and G780 were found to only
support a maximum conversion rate value of 7 (125 ms). On the other side,
chips labeled G781-1 and G784 were found to support a conversion rate value
of 8. There is no known means to distinguish G780 from G781 or G784; all
chips report the same manufacturer ID and chip revision.
Setting the conversion rate register value to 8 on chips not supporting
it causes unexpected behavior since the real conversion rate is set to 0
(16 seconds) if a value of 8 is written into the conversion rate register.
Limit the conversion rate register value to 7 for all G78x chips to avoid
the problem.

Fixes: fa6f4a0aa7c1 ("hwmon: (lm90) Add support for GMT G781")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c