Re: [lm-sensors] [PATCH] hwmon: (ina2xx) Change register cache to signed

2014-06-08 Thread Fabio Baltieri
On Sun, Jun 8, 2014 at 9:30 PM, Guenter Roeck wrote: > On Sun, Jun 08, 2014 at 01:16:00PM -0700, Guenter Roeck wrote: >> On Sat, Jun 07, 2014 at 09:47:01PM +0100, Fabio Baltieri wrote: >> > All devices supported by the ina2xx driver are bidirectional and reports >> > the measured value as a signed

Re: [lm-sensors] [PATCH] hwmon: (ina2xx) Change register cache to signed

2014-06-08 Thread Guenter Roeck
On Sun, Jun 08, 2014 at 01:16:00PM -0700, Guenter Roeck wrote: > On Sat, Jun 07, 2014 at 09:47:01PM +0100, Fabio Baltieri wrote: > > All devices supported by the ina2xx driver are bidirectional and reports > > the measured value as a signed 16 bit, but the current driver > > implementation caches t

Re: [PATCH] hwmon: (ina2xx) Change register cache to signed

2014-06-08 Thread Guenter Roeck
On Sat, Jun 07, 2014 at 09:47:01PM +0100, Fabio Baltieri wrote: > All devices supported by the ina2xx driver are bidirectional and reports > the measured value as a signed 16 bit, but the current driver > implementation caches the number as an u16, leading to an incorrect sign > extension when repo

[PATCH] hwmon: (ina2xx) Change register cache to signed

2014-06-07 Thread Fabio Baltieri
All devices supported by the ina2xx driver are bidirectional and reports the measured value as a signed 16 bit, but the current driver implementation caches the number as an u16, leading to an incorrect sign extension when reporting to the userspace in ina2xx_get_value(). This patch fixes the prob