Skip to content

Commit 07e0619

Browse files
collins-derek-nguyengroeck
authored andcommitted
hwmon: (ltc2947) fix temperature scaling
The LTC2947 datasheet (Rev. B) calls out in the section "Register Description: Non-Accumulated Result Registers" (pg. 30) that "To calculate temperature, multiply the TEMP register value by 0.204°C and add 5.5°C". Fix to add 5.5C and not 0.55C. Fixes: 9f90fd6 ("hwmon: Add support for ltc2947") Signed-off-by: Derek Nguyen <[email protected]> Signed-off-by: Brandon Maier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 094226a commit 07e0619

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/ltc2947-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int ltc2947_read_temp(struct device *dev, const u32 attr, long *val,
396396
return ret;
397397

398398
/* in milidegrees celcius, temp is given by: */
399-
*val = (__val * 204) + 550;
399+
*val = (__val * 204) + 5500;
400400

401401
return 0;
402402
}

0 commit comments

Comments
 (0)