diff options
author | Chris Packham <chris.packham@alliedtelesis.co.nz> | 2016-10-05 00:40:54 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2016-10-17 20:16:20 +0300 |
commit | 667f4bab81ea8357d260aa14bb6fb1a4834248d5 (patch) | |
tree | a0cadcf223dbfcfe8a7b708d88cb957bbca7b3c7 /drivers/hwmon/ltc4215.c | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) | |
download | linux-667f4bab81ea8357d260aa14bb6fb1a4834248d5.tar.xz |
hwmon: (adm9240) handle temperature readings below 0
Unlike the temperature thresholds the temperature data is a 9-bit signed
value. This allows and additional 0.5 degrees of precision on the
reading but makes handling negative values slightly harder. In order to
have sign-extension applied correctly the 9-bit value is stored in the
upper bits of a signed 16-bit value. When presenting this in sysfs the
value is shifted and scaled appropriately.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/ltc4215.c')
0 files changed, 0 insertions, 0 deletions