0001 Kernel driver ltc4245
0002 =====================
0003
0004 Supported chips:
0005
0006 * Linear Technology LTC4245
0007
0008 Prefix: 'ltc4245'
0009
0010 Addresses scanned: 0x20-0x3f
0011
0012 Datasheet:
0013
0014 http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1140,P19392,D13517
0015
0016 Author: Ira W. Snyder <iws@ovro.caltech.edu>
0017
0018
0019 Description
0020 -----------
0021
0022 The LTC4245 controller allows a board to be safely inserted and removed
0023 from a live backplane in multiple supply systems such as CompactPCI and
0024 PCI Express.
0025
0026
0027 Usage Notes
0028 -----------
0029
0030 This driver does not probe for LTC4245 devices, due to the fact that some
0031 of the possible addresses are unfriendly to probing. You will have to
0032 instantiate the devices explicitly.
0033
0034 Example: the following will load the driver for an LTC4245 at address 0x23
0035 on I2C bus #1::
0036
0037 $ modprobe ltc4245
0038 $ echo ltc4245 0x23 > /sys/bus/i2c/devices/i2c-1/new_device
0039
0040
0041 Sysfs entries
0042 -------------
0043
0044 The LTC4245 has built-in limits for over and under current warnings. This
0045 makes it very likely that the reference circuit will be used.
0046
0047 This driver uses the values in the datasheet to change the register values
0048 into the values specified in the sysfs-interface document. The current readings
0049 rely on the sense resistors listed in Table 2: "Sense Resistor Values".
0050
0051 ======================= =======================================================
0052 in1_input 12v input voltage (mV)
0053 in2_input 5v input voltage (mV)
0054 in3_input 3v input voltage (mV)
0055 in4_input Vee (-12v) input voltage (mV)
0056
0057 in1_min_alarm 12v input undervoltage alarm
0058 in2_min_alarm 5v input undervoltage alarm
0059 in3_min_alarm 3v input undervoltage alarm
0060 in4_min_alarm Vee (-12v) input undervoltage alarm
0061
0062 curr1_input 12v current (mA)
0063 curr2_input 5v current (mA)
0064 curr3_input 3v current (mA)
0065 curr4_input Vee (-12v) current (mA)
0066
0067 curr1_max_alarm 12v overcurrent alarm
0068 curr2_max_alarm 5v overcurrent alarm
0069 curr3_max_alarm 3v overcurrent alarm
0070 curr4_max_alarm Vee (-12v) overcurrent alarm
0071
0072 in5_input 12v output voltage (mV)
0073 in6_input 5v output voltage (mV)
0074 in7_input 3v output voltage (mV)
0075 in8_input Vee (-12v) output voltage (mV)
0076
0077 in5_min_alarm 12v output undervoltage alarm
0078 in6_min_alarm 5v output undervoltage alarm
0079 in7_min_alarm 3v output undervoltage alarm
0080 in8_min_alarm Vee (-12v) output undervoltage alarm
0081
0082 in9_input GPIO voltage data (see note 1)
0083 in10_input GPIO voltage data (see note 1)
0084 in11_input GPIO voltage data (see note 1)
0085
0086 power1_input 12v power usage (mW)
0087 power2_input 5v power usage (mW)
0088 power3_input 3v power usage (mW)
0089 power4_input Vee (-12v) power usage (mW)
0090 ======================= =======================================================
0091
0092
0093 Note 1
0094 ------
0095
0096 If you have NOT configured the driver to sample all GPIO pins as analog
0097 voltages, then the in10_input and in11_input sysfs attributes will not be
0098 created. The driver will sample the GPIO pin that is currently connected to the
0099 ADC as an analog voltage, and report the value in in9_input.
0100
0101 If you have configured the driver to sample all GPIO pins as analog voltages,
0102 then they will be sampled in round-robin fashion. If userspace reads too
0103 slowly, -EAGAIN will be returned when you read the sysfs attribute containing
0104 the sensor reading.
0105
0106 The LTC4245 chip can be configured to sample all GPIO pins with two methods:
0107
0108 1) platform data -- see include/linux/platform_data/ltc4245.h
0109 2) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip
0110
0111 The default mode of operation is to sample a single GPIO pin.