Merge tag 'lsm-pr-20230428' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
[linux-block.git] / Documentation / hwmon / ltc4245.rst
CommitLineData
6e34b187
IS
1Kernel driver ltc4245
2=====================
3
4Supported chips:
b04f2f7d 5
6e34b187 6 * Linear Technology LTC4245
b04f2f7d 7
6e34b187 8 Prefix: 'ltc4245'
b04f2f7d 9
6e34b187 10 Addresses scanned: 0x20-0x3f
b04f2f7d 11
6e34b187 12 Datasheet:
b04f2f7d
MCC
13
14 http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1140,P19392,D13517
6e34b187
IS
15
16Author: Ira W. Snyder <iws@ovro.caltech.edu>
17
18
19Description
20-----------
21
22The LTC4245 controller allows a board to be safely inserted and removed
23from a live backplane in multiple supply systems such as CompactPCI and
24PCI Express.
25
26
27Usage Notes
28-----------
29
30This driver does not probe for LTC4245 devices, due to the fact that some
2d2a7cff
JD
31of the possible addresses are unfriendly to probing. You will have to
32instantiate the devices explicitly.
6e34b187
IS
33
34Example: the following will load the driver for an LTC4245 at address 0x23
b04f2f7d
MCC
35on I2C bus #1::
36
37 $ modprobe ltc4245
38 $ echo ltc4245 0x23 > /sys/bus/i2c/devices/i2c-1/new_device
6e34b187
IS
39
40
41Sysfs entries
42-------------
43
44The LTC4245 has built-in limits for over and under current warnings. This
45makes it very likely that the reference circuit will be used.
46
47This driver uses the values in the datasheet to change the register values
48into the values specified in the sysfs-interface document. The current readings
49rely on the sense resistors listed in Table 2: "Sense Resistor Values".
50
b04f2f7d 51======================= =======================================================
6e34b187
IS
52in1_input 12v input voltage (mV)
53in2_input 5v input voltage (mV)
54in3_input 3v input voltage (mV)
55in4_input Vee (-12v) input voltage (mV)
56
57in1_min_alarm 12v input undervoltage alarm
58in2_min_alarm 5v input undervoltage alarm
59in3_min_alarm 3v input undervoltage alarm
60in4_min_alarm Vee (-12v) input undervoltage alarm
61
62curr1_input 12v current (mA)
63curr2_input 5v current (mA)
64curr3_input 3v current (mA)
65curr4_input Vee (-12v) current (mA)
66
67curr1_max_alarm 12v overcurrent alarm
68curr2_max_alarm 5v overcurrent alarm
69curr3_max_alarm 3v overcurrent alarm
70curr4_max_alarm Vee (-12v) overcurrent alarm
71
72in5_input 12v output voltage (mV)
73in6_input 5v output voltage (mV)
74in7_input 3v output voltage (mV)
75in8_input Vee (-12v) output voltage (mV)
76
77in5_min_alarm 12v output undervoltage alarm
78in6_min_alarm 5v output undervoltage alarm
79in7_min_alarm 3v output undervoltage alarm
80in8_min_alarm Vee (-12v) output undervoltage alarm
81
5950ec8d
IS
82in9_input GPIO voltage data (see note 1)
83in10_input GPIO voltage data (see note 1)
84in11_input GPIO voltage data (see note 1)
6e34b187
IS
85
86power1_input 12v power usage (mW)
87power2_input 5v power usage (mW)
88power3_input 3v power usage (mW)
89power4_input Vee (-12v) power usage (mW)
b04f2f7d 90======================= =======================================================
5950ec8d
IS
91
92
93Note 1
94------
95
96If you have NOT configured the driver to sample all GPIO pins as analog
97voltages, then the in10_input and in11_input sysfs attributes will not be
98created. The driver will sample the GPIO pin that is currently connected to the
99ADC as an analog voltage, and report the value in in9_input.
100
101If you have configured the driver to sample all GPIO pins as analog voltages,
102then they will be sampled in round-robin fashion. If userspace reads too
103slowly, -EAGAIN will be returned when you read the sysfs attribute containing
104the sensor reading.
105
106The LTC4245 chip can be configured to sample all GPIO pins with two methods:
b04f2f7d 107
8116e8dd 1081) platform data -- see include/linux/platform_data/ltc4245.h
5950ec8d
IS
1092) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip
110
111The default mode of operation is to sample a single GPIO pin.