summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ltc2990.c
AgeCommit message (Collapse)Author
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 253Thomas Gleixner
Based on 1 normalized pattern(s): license gplv2 and 1 additional normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 5 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141332.723143934@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-18hwmon: (ltc2990) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-05-21hwmon: (ltc2990) support all measurement modesTom Levens
Updated version of the ltc2990 driver which supports all measurement modes (current, voltage, temperature) available in the chip. If devicetree is used, the mode must be specified with the property "lltc,meas-mode". The format and possible values of the property are described in the binding. If devicetree is not used, the mode of the chip will not be configured. Unless the chip is configured by another source, only the internal temperature and supply voltage will be measured. Signed-off-by: Tom Levens <tom.levens@cern.ch> Tested-By: mike.looijmans@topic.nl [groeck: Fixed compiler warning] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-05-21hwmon: (ltc2990) Fix incorrect conversion of negative temperaturesTom Levens
Fix incorrect conversion of negative temperatures by using sign_extend32() instead of a home-grown conversion function. Fixes: df922703574e ("hwmon: Add LTC2990 sensor driver") Signed-off-by: Tom Levens <tom.levens@cern.ch> [groeck: Updated subject and description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05hwmon: Add LTC2990 sensor driverMike Looijmans
This adds support for the Linear Technology LTC2990 I2C System Monitor. The LTC2990 supports a combination of voltage, current and temperature monitoring. This driver currently only supports reading two currents by measuring two differential voltages across series resistors, in addition to the Vcc supply voltage and internal temperature. This is sufficient to support the Topic Miami SOM which uses this chip to monitor the currents flowing into the FPGA and the CPU parts. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>