Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver ltc2945
0002 =====================
0003 
0004 Supported chips:
0005 
0006   * Linear Technology LTC2945
0007 
0008     Prefix: 'ltc2945'
0009 
0010     Addresses scanned: -
0011 
0012     Datasheet:
0013 
0014         https://www.analog.com/media/en/technical-documentation/data-sheets/2945fb.pdf
0015 
0016 Author: Guenter Roeck <linux@roeck-us.net>
0017 
0018 
0019 Description
0020 -----------
0021 
0022 The LTC2945  is a rail-to-rail system monitor that measures current, voltage,
0023 and power consumption.
0024 
0025 
0026 Usage Notes
0027 -----------
0028 
0029 This driver does not probe for LTC2945 devices, since there is no register
0030 which can be safely used to identify the chip. You will have to instantiate
0031 the devices explicitly.
0032 
0033 Example: the following will load the driver for an LTC2945 at address 0x10
0034 on I2C bus #1::
0035 
0036         $ modprobe ltc2945
0037         $ echo ltc2945 0x10 > /sys/bus/i2c/devices/i2c-1/new_device
0038 
0039 
0040 Sysfs entries
0041 -------------
0042 
0043 Voltage readings provided by this driver are reported as obtained from the ADC
0044 registers. If a set of voltage divider resistors is installed, calculate the
0045 real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the
0046 value of the divider resistor against the measured voltage and R2 is the value
0047 of the divider resistor against Ground.
0048 
0049 Current reading provided by this driver is reported as obtained from the ADC
0050 Current Sense register. The reported value assumes that a 1 mOhm sense resistor
0051 is installed. If a different sense resistor is installed, calculate the real
0052 current by dividing the reported value by the sense resistor value in mOhm.
0053 
0054 ======================= ========================================================
0055 in1_input               VIN voltage (mV). Voltage is measured either at
0056                         SENSE+ or VDD pin depending on chip configuration.
0057 in1_min                 Undervoltage threshold
0058 in1_max                 Overvoltage threshold
0059 in1_lowest              Lowest measured voltage
0060 in1_highest             Highest measured voltage
0061 in1_reset_history       Write 1 to reset in1 history
0062 in1_min_alarm           Undervoltage alarm
0063 in1_max_alarm           Overvoltage alarm
0064 
0065 in2_input               ADIN voltage (mV)
0066 in2_min                 Undervoltage threshold
0067 in2_max                 Overvoltage threshold
0068 in2_lowest              Lowest measured voltage
0069 in2_highest             Highest measured voltage
0070 in2_reset_history       Write 1 to reset in2 history
0071 in2_min_alarm           Undervoltage alarm
0072 in2_max_alarm           Overvoltage alarm
0073 
0074 curr1_input             SENSE current (mA)
0075 curr1_min               Undercurrent threshold
0076 curr1_max               Overcurrent threshold
0077 curr1_lowest            Lowest measured current
0078 curr1_highest           Highest measured current
0079 curr1_reset_history     Write 1 to reset curr1 history
0080 curr1_min_alarm         Undercurrent alarm
0081 curr1_max_alarm         Overcurrent alarm
0082 
0083 power1_input            Power (in uW). Power is calculated based on SENSE+/VDD
0084                         voltage or ADIN voltage depending on chip configuration.
0085 power1_min              Low lower threshold
0086 power1_max              High power threshold
0087 power1_input_lowest     Historical minimum power use
0088 power1_input_highest    Historical maximum power use
0089 power1_reset_history    Write 1 to reset power1 history
0090 power1_min_alarm        Low power alarm
0091 power1_max_alarm        High power alarm
0092 ======================= ========================================================