Re: [PATCHv2] hwmon: adm9240: handle temperature readings below 0

2016-10-04 Thread Guenter Roeck
On Wed, Oct 05, 2016 at 10:40:54AM +1300, Chris Packham wrote: > 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

[PATCHv2] hwmon: adm9240: handle temperature readings below 0

2016-10-04 Thread Chris Packham
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