summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ltc2992.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-11hwmon: (ltc2992) Fix less than zero comparisons with an unsigned integerColin Ian King1-5/+5
There are several occurrances of a less than zero error check on a u32 unsigned integer. These will never be true. Fix this by making reg_value a plain int. Addresses-Coverity: ("Unsigned comparison against zero") Fixes: e126370240e0 ("hwmon: (ltc2992) Add support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20201207142410.168987-1-colin.king@canonical.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11hwmon: (ltc2992) Add support for GPIOs.Alexandru Tachici1-1/+159
LTC2992 has 4 open-drain GPIOS. This patch exports to user space the 4 GPIOs using the GPIO driver Linux API. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11hwmon: (ltc2992) Add supportAlexandru Tachici1-0/+813
LTC2992 is a rail-to-rail system monitor that measures current, voltage, and power of two supplies. Two ADCs simultaneously measure each supply’s current. A third ADC monitors the input voltages and four auxiliary external voltages. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>