summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ina2xx.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (ina2xx) Fix word size register read and write operationsGuenter Roeck2012-09-121-21/+9
| | | | | | | | | | | | | | The driver uses be16_to_cpu and cpu_to_be16 to convert data in SMBus word operations from chip to host byte order. However, the data passed from and to the SMBus word API functions is in host byte order, not in chip byte order. Conversion should therefore use swab16 instead of be16 to change the byte order. Replace driver internal word conversion functions with SMBus API functions to solve the problem. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 3.5+ Acked-by: Jean Delvare <khali@linux-fr.org>
* hwmon: INA219 and INA226 supportFelten, Lothar2012-05-221-0/+368
Add support for the Texas Instruments INA219 and INA226 power monitors. Signed-off-by: Lothar Felten <l-felten@ti.com> [guenter.roeck@ericsson.com: formatting cleanup; check for smbus word data; select PGA=8 for INA219] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
OpenPOWER on IntegriCloud