Back to home page

OSCL-LXR

 
 

    


0001 Kernel drivers ltc2947-i2c and ltc2947-spi
0002 ==========================================
0003 
0004 Supported chips:
0005 
0006   * Analog Devices LTC2947
0007 
0008     Prefix: 'ltc2947'
0009 
0010     Addresses scanned: -
0011 
0012     Datasheet:
0013 
0014         https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
0015 
0016 Author: Nuno Sá <nuno.sa@analog.com>
0017 
0018 Description
0019 ___________
0020 
0021 The LTC2947 is a high precision power and energy monitor that measures current,
0022 voltage, power, temperature, charge and energy. The device supports both SPI
0023 and I2C depending on the chip configuration.
0024 The device also measures accumulated quantities as energy. It has two banks of
0025 register's to read/set energy related values. These banks can be configured
0026 independently to have setups like: energy1 accumulates always and enrgy2 only
0027 accumulates if current is positive (to check battery charging efficiency for
0028 example). The device also supports a GPIO pin that can be configured as output
0029 to control a fan as a function of measured temperature. Then, the GPIO becomes
0030 active as soon as a temperature reading is higher than a defined threshold. The
0031 temp2 channel is used to control this thresholds and to read the respective
0032 alarms.
0033 
0034 Sysfs entries
0035 _____________
0036 
0037 The following attributes are supported. Limits are read-write, reset_history
0038 is write-only and all the other attributes are read-only.
0039 
0040 ======================= ==========================================
0041 in0_input               VP-VM voltage (mV).
0042 in0_min                 Undervoltage threshold
0043 in0_max                 Overvoltage threshold
0044 in0_lowest              Lowest measured voltage
0045 in0_highest             Highest measured voltage
0046 in0_reset_history       Write 1 to reset in1 history
0047 in0_min_alarm           Undervoltage alarm
0048 in0_max_alarm           Overvoltage alarm
0049 in0_label               Channel label (VP-VM)
0050 
0051 in1_input               DVCC voltage (mV)
0052 in1_min                 Undervoltage threshold
0053 in1_max                 Overvoltage threshold
0054 in1_lowest              Lowest measured voltage
0055 in1_highest             Highest measured voltage
0056 in1_reset_history       Write 1 to reset in2 history
0057 in1_min_alarm           Undervoltage alarm
0058 in1_max_alarm           Overvoltage alarm
0059 in1_label               Channel label (DVCC)
0060 
0061 curr1_input             IP-IM Sense current (mA)
0062 curr1_min               Undercurrent threshold
0063 curr1_max               Overcurrent threshold
0064 curr1_lowest            Lowest measured current
0065 curr1_highest           Highest measured current
0066 curr1_reset_history     Write 1 to reset curr1 history
0067 curr1_min_alarm         Undercurrent alarm
0068 curr1_max_alarm         Overcurrent alarm
0069 curr1_label             Channel label (IP-IM)
0070 
0071 power1_input            Power (in uW)
0072 power1_min              Low power threshold
0073 power1_max              High power threshold
0074 power1_input_lowest     Historical minimum power use
0075 power1_input_highest    Historical maximum power use
0076 power1_reset_history    Write 1 to reset power1 history
0077 power1_min_alarm        Low power alarm
0078 power1_max_alarm        High power alarm
0079 power1_label            Channel label (Power)
0080 
0081 temp1_input             Chip Temperature (in milliC)
0082 temp1_min               Low temperature threshold
0083 temp1_max               High temperature threshold
0084 temp1_input_lowest      Historical minimum temperature use
0085 temp1_input_highest     Historical maximum temperature use
0086 temp1_reset_history     Write 1 to reset temp1 history
0087 temp1_min_alarm         Low temperature alarm
0088 temp1_max_alarm         High temperature alarm
0089 temp1_label             Channel label (Ambient)
0090 
0091 temp2_min               Low temperature threshold for fan control
0092 temp2_max               High temperature threshold for fan control
0093 temp2_min_alarm         Low temperature fan control alarm
0094 temp2_max_alarm         High temperature fan control alarm
0095 temp2_label             Channel label (TEMPFAN)
0096 
0097 energy1_input           Measured energy over time (in microJoule)
0098 
0099 energy2_input           Measured energy over time (in microJoule)
0100 ======================= ==========================================