Kernel drivers ltc2947-i2c and ltc2947-spi

Supported chips:

Author: Nuno Sá <nuno.sa@analog.com>

Description

The LTC2947 is a high precision power and energy monitor that measures current,voltage, power, temperature, charge and energy. The device supports both SPIand I2C depending on the chip configuration.The device also measures accumulated quantities as energy. It has two banks ofregister’s to read/set energy related values. These banks can be configuredindependently to have setups like: energy1 accumulates always and enrgy2 onlyaccumulates if current is positive (to check battery charging efficiency forexample). The device also supports a GPIO pin that can be configured as outputto control a fan as a function of measured temperature. Then, the GPIO becomesactive as soon as a temperature reading is higher than a defined threshold. Thetemp2 channel is used to control this thresholds and to read the respectivealarms.

Sysfs entries

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

in0_inputVP-VM voltage (mV).
in0_minUndervoltage threshold
in0_maxOvervoltage threshold
in0_lowestLowest measured voltage
in0_highestHighest measured voltage
in0_reset_historyWrite 1 to reset in1 history
in0_min_alarmUndervoltage alarm
in0_max_alarmOvervoltage alarm
in0_labelChannel label (VP-VM)
in1_inputDVCC voltage (mV)
in1_minUndervoltage threshold
in1_maxOvervoltage threshold
in1_lowestLowest measured voltage
in1_highestHighest measured voltage
in1_reset_historyWrite 1 to reset in2 history
in1_min_alarmUndervoltage alarm
in1_max_alarmOvervoltage alarm
in1_labelChannel label (DVCC)
curr1_inputIP-IM Sense current (mA)
curr1_minUndercurrent threshold
curr1_maxOvercurrent threshold
curr1_lowestLowest measured current
curr1_highestHighest measured current
curr1_reset_historyWrite 1 to reset curr1 history
curr1_min_alarmUndercurrent alarm
curr1_max_alarmOvercurrent alarm
curr1_labelChannel label (IP-IM)
power1_inputPower (in uW)
power1_minLow power threshold
power1_maxHigh power threshold
power1_input_lowestHistorical minimum power use
power1_input_highestHistorical maximum power use
power1_reset_historyWrite 1 to reset power1 history
power1_min_alarmLow power alarm
power1_max_alarmHigh power alarm
power1_labelChannel label (Power)
temp1_inputChip Temperature (in milliC)
temp1_minLow temperature threshold
temp1_maxHigh temperature threshold
temp1_input_lowestHistorical minimum temperature use
temp1_input_highestHistorical maximum temperature use
temp1_reset_historyWrite 1 to reset temp1 history
temp1_min_alarmLow temperature alarm
temp1_max_alarmHigh temperature alarm
temp1_labelChannel label (Ambient)
temp2_minLow temperature threshold for fan control
temp2_maxHigh temperature threshold for fan control
temp2_min_alarmLow temperature fan control alarm
temp2_max_alarmHigh temperature fan control alarm
temp2_labelChannel label (TEMPFAN)
energy1_inputMeasured energy over time (in microJoule)
energy2_inputMeasured energy over time (in microJoule)