Skip to content

Commit

Permalink
hwmon: (ltc2992) Add support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandru Tachici authored and Guenter Roeck committed Dec 11, 2020
1 parent d014538 commit b0bd407
Show file tree
Hide file tree
Showing 5 changed files with 882 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/hwmon/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Hardware Monitoring Kernel Drivers
lm95234
lm95245
lochnagar
ltc2992
ltc2945
ltc2947
ltc2978
Expand Down
56 changes: 56 additions & 0 deletions Documentation/hwmon/ltc2992.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.. SPDX-License-Identifier: GPL-2.0
Kernel driver ltc2992
=====================

Supported chips:
* Linear Technology LTC2992
Prefix: 'ltc2992'
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2992.pdf

Author: Alexandru Tachici <alexandru.tachici@analog.com>


Description
-----------

This driver supports hardware monitoring for Linear Technology LTC2992 power monitor.

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.


Sysfs entries
-------------

The following attributes are supported. Limits are read-write,
all other attributes are read-only.

in_reset_history Reset all highest/lowest values.

inX_input Measured voltage.
inX_lowest Minimum measured voltage.
inX_highest Maximum measured voltage.
inX_min Minimum voltage allowed.
inX_max Maximum voltage allowed.
inX_min_alarm An undervoltage occurred. Cleared on read.
inX_max_alarm An overvoltage occurred. Cleared on read.

currX_input Measured current.
currX_lowest Minimum measured current.
currX_highest Maximum measured current.
currX_min Minimum current allowed.
currX_max Maximum current allowed.
currX_min_alarm An undercurrent occurred. Cleared on read.
currX_max_alarm An overcurrent occurred. Cleared on read.

powerX_input Measured power.
powerX_input_lowest Minimum measured voltage.
powerX_input_highest Maximum measured voltage.
powerX_min Minimum power.
powerX_max Maximum power.
powerX_min_alarm An underpower occurred. Cleared on read.
powerX_max_alarm An overpower occurred. Cleared on read.
11 changes: 11 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,17 @@ config SENSORS_LTC2990
This driver can also be built as a module. If so, the module will
be called ltc2990.

config SENSORS_LTC2992
tristate "Linear Technology LTC2992"
depends on I2C
help
If you say yes here you get support for Linear Technology LTC2992
I2C System Monitor. The LTC2992 measures current, voltage, and
power of two supplies.

This driver can also be built as a module. If so, the module will
be called ltc2992.

config SENSORS_LTC4151
tristate "Linear Technology LTC4151"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ obj-$(CONFIG_SENSORS_LTC2947) += ltc2947-core.o
obj-$(CONFIG_SENSORS_LTC2947_I2C) += ltc2947-i2c.o
obj-$(CONFIG_SENSORS_LTC2947_SPI) += ltc2947-spi.o
obj-$(CONFIG_SENSORS_LTC2990) += ltc2990.o
obj-$(CONFIG_SENSORS_LTC2992) += ltc2992.o
obj-$(CONFIG_SENSORS_LTC4151) += ltc4151.o
obj-$(CONFIG_SENSORS_LTC4215) += ltc4215.o
obj-$(CONFIG_SENSORS_LTC4222) += ltc4222.o
Expand Down
Loading

0 comments on commit b0bd407

Please sign in to comment.