Re: adm9240 error handling (was Re: [PATCHv1] hwmon: adm9240: handle temperature readings below 0)

2016-10-05 Thread Guenter Roeck
On 10/04/2016 10:00 PM, Chris Packham wrote: Hi Guenter, On 10/05/2016 11:10 AM, Guenter Roeck wrote: On Tue, Oct 04, 2016 at 09:09:10PM +, Chris Packham wrote: Of course, all that doesn't solve the real problem in this driver, which is that it ignores error codes from the smbus functio

adm9240 error handling (was Re: [PATCHv1] hwmon: adm9240: handle temperature readings below 0)

2016-10-04 Thread Chris Packham
Hi Guenter, On 10/05/2016 11:10 AM, Guenter Roeck wrote: > On Tue, Oct 04, 2016 at 09:09:10PM +, Chris Packham wrote: >> >>> >>> Of course, all that doesn't solve the real problem in this driver, which is >>> that it ignores error codes from the smbus functions, but that is a >>> different >>

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

2016-10-04 Thread Guenter Roeck
On Tue, Oct 04, 2016 at 09:09:10PM +, Chris Packham wrote: > > > > > Of course, all that doesn't solve the real problem in this driver, which is > > that it ignores error codes from the smbus functions, but that is a > > different > > problem. > > Yeah I'd noted that too. This patch is actua

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

2016-10-04 Thread Chris Packham
On 10/05/2016 09:54 AM, Guenter Roeck wrote: > On Tue, Oct 04, 2016 at 05:08:00PM +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 means we can't rely on sign-e

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

2016-10-04 Thread Guenter Roeck
On Tue, Oct 04, 2016 at 05:08:00PM +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 means we can't rely on sign-extension to handle negative > values. > > Signed-

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

2016-10-03 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 means we can't rely on sign-extension to handle negative values. Signed-off-by: Chris Packham --- drivers/hwmon/adm9240.c | 19 +-