Skip to content
Commit 9028ff8e authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (lm80) Simplify TEMP_FROM_REG



TEMP_FROM_REG gets 12 bits of temperature data in the upper 12 bit
of a signed 16 bit parameter, with the integer part (including sign)
in the upper 8 bit and the remainder in bit 4..7. The lower 4 bit of
the 16 bit data is always 0. We can use that information to convert
the temperature directly into display data (1/1000th of degree C).

Note that the stored temperature data is not shifted right as the
comment claimed, so remove that misleading comment.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent a0ac840d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment