Re: [PATCH v2] hwmon: (ina2xx) Cast to s16 on shunt and current regs

2014-06-09 Thread Guenter Roeck
On 06/08/2014 02:06 PM, Fabio Baltieri wrote: All devices supported by ina2xx are bidirectional and reports the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to

Re: [PATCH v2] hwmon: (ina2xx) Cast to s16 on shunt and current regs

2014-06-09 Thread Guenter Roeck
On 06/08/2014 02:06 PM, Fabio Baltieri wrote: All devices supported by ina2xx are bidirectional and reports the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to

[PATCH v2] hwmon: (ina2xx) Cast to s16 on shunt and current regs

2014-06-08 Thread Fabio Baltieri
All devices supported by ina2xx are bidirectional and reports the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to the userspace in ina2xx_get_value(). This patch

[PATCH v2] hwmon: (ina2xx) Cast to s16 on shunt and current regs

2014-06-08 Thread Fabio Baltieri
All devices supported by ina2xx are bidirectional and reports the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to the userspace in ina2xx_get_value(). This patch