Skip to content

Commit a66c5ed

Browse files
committed
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: ae544f6 ("hwmon: (lm90) Add support for GMT G781") Signed-off-by: Guenter Roeck <[email protected]>
1 parent e783362 commit a66c5ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/lm90.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static const struct lm90_params lm90_params[] = {
373373
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
374374
| LM90_HAVE_BROKEN_ALERT | LM90_HAVE_CRIT,
375375
.alert_alarms = 0x7c,
376-
.max_convrate = 8,
376+
.max_convrate = 7,
377377
},
378378
[lm86] = {
379379
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT

0 commit comments

Comments
 (0)