hwmon: (max16064) Add driver documentation
[deliverable/linux.git] / Documentation / hwmon / pmbus
CommitLineData
44f5a408
GR
1Kernel driver pmbus
2====================
3
4Supported chips:
5 * Ericsson BMR45X series
6 DC/DC Converter
7 Prefixes: 'bmr450', 'bmr451', 'bmr453', 'bmr454'
8 Addresses scanned: -
9 Datasheet:
10 http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146395
11 * Linear Technology LTC2978
12 Octal PMBus Power Supply Monitor and Controller
13 Prefix: 'ltc2978'
14 Addresses scanned: -
15 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
44f5a408
GR
16 * Maxim MAX34440
17 PMBus 6-Channel Power-Supply Manager
18 Prefixes: 'max34440'
19 Addresses scanned: -
20 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
21 * Maxim MAX34441
22 PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
23 Prefixes: 'max34441'
24 Addresses scanned: -
25 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
44f5a408
GR
26 * Generic PMBus devices
27 Prefix: 'pmbus'
28 Addresses scanned: -
29 Datasheet: n.a.
30
31Author: Guenter Roeck <guenter.roeck@ericsson.com>
32
33
34Description
35-----------
36
37This driver supports hardware montoring for various PMBus compliant devices.
38It supports voltage, current, power, and temperature sensors as supported
39by the device.
40
41Each monitored channel has its own high and low limits, plus a critical
42limit.
43
44Fan support will be added in a later version of this driver.
45
46
47Usage Notes
48-----------
49
50This driver does not probe for PMBus devices, since there is no register
51which can be safely used to identify the chip (The MFG_ID register is not
52supported by all chips), and since there is no well defined address range for
53PMBus devices. You will have to instantiate the devices explicitly.
54
55Example: the following will load the driver for an LTC2978 at address 0x60
56on I2C bus #1:
57$ modprobe pmbus
58$ echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device
59
60
61Platform data support
62---------------------
63
64Support for additional PMBus chips can be added by defining chip parameters in
65a new chip specific driver file. For example, (untested) code to add support for
66Emerson DS1200 power modules might look as follows.
67
68static struct pmbus_driver_info ds1200_info = {
69 .pages = 1,
70 /* Note: All other sensors are in linear mode */
71 .direct[PSC_VOLTAGE_OUT] = true,
72 .direct[PSC_TEMPERATURE] = true,
73 .direct[PSC_CURRENT_OUT] = true,
74 .m[PSC_VOLTAGE_IN] = 1,
75 .b[PSC_VOLTAGE_IN] = 0,
76 .R[PSC_VOLTAGE_IN] = 3,
77 .m[PSC_VOLTAGE_OUT] = 1,
78 .b[PSC_VOLTAGE_OUT] = 0,
79 .R[PSC_VOLTAGE_OUT] = 3,
80 .m[PSC_TEMPERATURE] = 1,
81 .b[PSC_TEMPERATURE] = 0,
82 .R[PSC_TEMPERATURE] = 3,
83 .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_STATUS_INPUT
84 | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
85 | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
86 | PMBUS_HAVE_PIN | PMBUS_HAVE_POUT
87 | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP
88 | PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_FAN12,
89};
90
91static int ds1200_probe(struct i2c_client *client,
92 const struct i2c_device_id *id)
93{
94 return pmbus_do_probe(client, id, &ds1200_info);
95}
96
97static int ds1200_remove(struct i2c_client *client)
98{
99 return pmbus_do_remove(client);
100}
101
102static const struct i2c_device_id ds1200_id[] = {
103 {"ds1200", 0},
104 {}
105};
106
107MODULE_DEVICE_TABLE(i2c, ds1200_id);
108
109/* This is the driver that will be inserted */
110static struct i2c_driver ds1200_driver = {
111 .driver = {
112 .name = "ds1200",
113 },
114 .probe = ds1200_probe,
115 .remove = ds1200_remove,
116 .id_table = ds1200_id,
117};
118
119static int __init ds1200_init(void)
120{
121 return i2c_add_driver(&ds1200_driver);
122}
123
124static void __exit ds1200_exit(void)
125{
126 i2c_del_driver(&ds1200_driver);
127}
128
129
130Sysfs entries
131-------------
132
133When probing the chip, the driver identifies which PMBus registers are
134supported, and determines available sensors from this information.
135Attribute files only exist if respective sensors are suported by the chip.
136Labels are provided to inform the user about the sensor associated with
137a given sysfs entry.
138
139The following attributes are supported. Limits are read-write; all other
140attributes are read-only.
141
142inX_input Measured voltage. From READ_VIN or READ_VOUT register.
25985edc 143inX_min Minimum Voltage.
44f5a408
GR
144 From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register.
145inX_max Maximum voltage.
146 From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register.
25985edc 147inX_lcrit Critical minimum Voltage.
44f5a408
GR
148 From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register.
149inX_crit Critical maximum voltage.
150 From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register.
151inX_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
152inX_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
153inX_lcrit_alarm Voltage critical low alarm.
154 From VOLTAGE_UV_FAULT status.
155inX_crit_alarm Voltage critical high alarm.
156 From VOLTAGE_OV_FAULT status.
157inX_label "vin", "vcap", or "voutY"
158
159currX_input Measured current. From READ_IIN or READ_IOUT register.
160currX_max Maximum current.
161 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register.
25985edc 162currX_lcrit Critical minimum output current.
44f5a408
GR
163 From IOUT_UC_FAULT_LIMIT register.
164currX_crit Critical maximum current.
165 From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register.
166currX_alarm Current high alarm.
167 From IIN_OC_WARNING or IOUT_OC_WARNING status.
180b3d88
GR
168currX_max_alarm Current high alarm.
169 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT status.
44f5a408
GR
170currX_lcrit_alarm Output current critical low alarm.
171 From IOUT_UC_FAULT status.
172currX_crit_alarm Current critical high alarm.
173 From IIN_OC_FAULT or IOUT_OC_FAULT status.
180b3d88 174currX_label "iin" or "ioutY"
44f5a408
GR
175
176powerX_input Measured power. From READ_PIN or READ_POUT register.
177powerX_cap Output power cap. From POUT_MAX register.
178powerX_max Power limit. From PIN_OP_WARN_LIMIT or
179 POUT_OP_WARN_LIMIT register.
180powerX_crit Critical output power limit.
181 From POUT_OP_FAULT_LIMIT register.
182powerX_alarm Power high alarm.
183 From PIN_OP_WARNING or POUT_OP_WARNING status.
184powerX_crit_alarm Output power critical high alarm.
185 From POUT_OP_FAULT status.
186powerX_label "pin" or "poutY"
187
180b3d88 188tempX_input Measured temperature.
44f5a408 189 From READ_TEMPERATURE_X register.
180b3d88
GR
190tempX_min Mimimum temperature. From UT_WARN_LIMIT register.
191tempX_max Maximum temperature. From OT_WARN_LIMIT register.
192tempX_lcrit Critical low temperature.
44f5a408 193 From UT_FAULT_LIMIT register.
180b3d88 194tempX_crit Critical high temperature.
44f5a408
GR
195 From OT_FAULT_LIMIT register.
196tempX_min_alarm Chip temperature low alarm. Set by comparing
197 READ_TEMPERATURE_X with UT_WARN_LIMIT if
198 TEMP_UT_WARNING status is set.
199tempX_max_alarm Chip temperature high alarm. Set by comparing
200 READ_TEMPERATURE_X with OT_WARN_LIMIT if
201 TEMP_OT_WARNING status is set.
202tempX_lcrit_alarm Chip temperature critical low alarm. Set by comparing
203 READ_TEMPERATURE_X with UT_FAULT_LIMIT if
204 TEMP_UT_FAULT status is set.
205tempX_crit_alarm Chip temperature critical high alarm. Set by comparing
206 READ_TEMPERATURE_X with OT_FAULT_LIMIT if
207 TEMP_OT_FAULT status is set.
This page took 0.043787 seconds and 5 git commands to generate.