aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-26 08:52:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-26 08:52:52 -0400
commit3cb603284b3d256ae9ae9e65887cee8416bfef15 (patch)
treea7012e9ca585c4ada1ff8896de326f540b460f80 /Documentation
parent2355e4290336fcda4b4a799448f745155a000226 (diff)
parentc5794cfac09a585945e1632451900594db19393b (diff)
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (26 commits) hwmon: (w83627ehf) Better fix for negative temperature values hwmon: (w83627ehf) Uninline is_word_sized hwmon: (lm75) Document why clones are not detected hwmon: (w83627ehf) Move fan pins check to a separate function hwmon: (w83627ehf) Skip reading unused voltage registers hwmon: (lm75) Add support for Analog Devices ADT75 hwmon: (pmbus_core) Simplify sign extensions hwmon: (pmbus) Add support for Lineage Power DC-DC converters hwmon: (pmbus/ltc2978) Add support for LTC3880 to LTC2978 driver hwmon: (pmbus/ltc2978) Explicit driver for LTC2978 hwmon: (pmbus) Add support for TEMP2 peak attributes hwmon: AD7314 driver (ported from IIO) hwmon: (pmbus) Add support for Intersil power management chips hwmon: (pmbus) Always call _pmbus_read_byte in core driver hwmon: (pmbus) Replace EINVAL return codes with more appropriate errors hwmon: (pmbus) Provide more documentation hwmon/f71882fg: Make the decision wether to register fan attr. per fan hwmon/f71882fg: Add a f71882fg_create_fan_sysfs_files helper function hwmon/f71882fg: Make all fan/pwm attr tables 2 dimensional hwmon: (exynos4_tmu) Remove IRQF_DISABLED ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/hwmon/ad731425
-rw-r--r--Documentation/hwmon/adm127540
-rw-r--r--Documentation/hwmon/exynos4_tmu81
-rw-r--r--Documentation/hwmon/lm7561
-rw-r--r--Documentation/hwmon/ltc2978103
-rw-r--r--Documentation/hwmon/pmbus13
-rw-r--r--Documentation/hwmon/pmbus-core283
-rw-r--r--Documentation/hwmon/zl6100125
8 files changed, 689 insertions, 42 deletions
diff --git a/Documentation/hwmon/ad7314 b/Documentation/hwmon/ad7314
new file mode 100644
index 000000000000..1912549c7467
--- /dev/null
+++ b/Documentation/hwmon/ad7314
@@ -0,0 +1,25 @@
1Kernel driver ad7314
2====================
3
4Supported chips:
5 * Analog Devices AD7314
6 Prefix: 'ad7314'
7 Datasheet: Publicly available at Analog Devices website.
8 * Analog Devices ADT7301
9 Prefix: 'adt7301'
10 Datasheet: Publicly available at Analog Devices website.
11 * Analog Devices ADT7302
12 Prefix: 'adt7302'
13 Datasheet: Publicly available at Analog Devices website.
14
15Description
16-----------
17
18Driver supports the above parts. The ad7314 has a 10 bit
19sensor with 1lsb = 0.25 degrees centigrade. The adt7301 and
20adt7302 have 14 bit sensors with 1lsb = 0.03125 degrees centigrade.
21
22Notes
23-----
24
25Currently power down mode is not supported.
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275
index 097b3ccc4be7..ab70d96d2dfd 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275
@@ -6,6 +6,10 @@ Supported chips:
6 Prefix: 'adm1275' 6 Prefix: 'adm1275'
7 Addresses scanned: - 7 Addresses scanned: -
8 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf 8 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf
9 * Analog Devices ADM1276
10 Prefix: 'adm1276'
11 Addresses scanned: -
12 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf
9 13
10Author: Guenter Roeck <guenter.roeck@ericsson.com> 14Author: Guenter Roeck <guenter.roeck@ericsson.com>
11 15
@@ -13,13 +17,13 @@ Author: Guenter Roeck <guenter.roeck@ericsson.com>
13Description 17Description
14----------- 18-----------
15 19
16This driver supports hardware montoring for Analog Devices ADM1275 Hot-Swap 20This driver supports hardware montoring for Analog Devices ADM1275 and ADM1276
17Controller and Digital Power Monitor. 21Hot-Swap Controller and Digital Power Monitor.
18 22
19The ADM1275 is a hot-swap controller that allows a circuit board to be removed 23ADM1275 and ADM1276 are hot-swap controllers that allow a circuit board to be
20from or inserted into a live backplane. It also features current and voltage 24removed from or inserted into a live backplane. They also feature current and
21readback via an integrated 12-bit analog-to-digital converter (ADC), accessed 25voltage readback via an integrated 12-bit analog-to-digital converter (ADC),
22using a PMBus. interface. 26accessed using a PMBus interface.
23 27
24The driver is a client driver to the core PMBus driver. Please see 28The driver is a client driver to the core PMBus driver. Please see
25Documentation/hwmon/pmbus for details on PMBus client drivers. 29Documentation/hwmon/pmbus for details on PMBus client drivers.
@@ -48,17 +52,25 @@ attributes are write-only, all other attributes are read-only.
48 52
49in1_label "vin1" or "vout1" depending on chip variant and 53in1_label "vin1" or "vout1" depending on chip variant and
50 configuration. 54 configuration.
51in1_input Measured voltage. From READ_VOUT register. 55in1_input Measured voltage.
52in1_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 56in1_min Minumum Voltage.
53in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 57in1_max Maximum voltage.
54in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 58in1_min_alarm Voltage low alarm.
55in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 59in1_max_alarm Voltage high alarm.
56in1_highest Historical maximum voltage. 60in1_highest Historical maximum voltage.
57in1_reset_history Write any value to reset history. 61in1_reset_history Write any value to reset history.
58 62
59curr1_label "iout1" 63curr1_label "iout1"
60curr1_input Measured current. From READ_IOUT register. 64curr1_input Measured current.
61curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register. 65curr1_max Maximum current.
62curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT register. 66curr1_max_alarm Current high alarm.
67curr1_lcrit Critical minimum current. Depending on the chip
68 configuration, either curr1_lcrit or curr1_crit is
69 supported, but not both.
70curr1_lcrit_alarm Critical current low alarm.
71curr1_crit Critical maximum current. Depending on the chip
72 configuration, either curr1_lcrit or curr1_crit is
73 supported, but not both.
74curr1_crit_alarm Critical current high alarm.
63curr1_highest Historical maximum current. 75curr1_highest Historical maximum current.
64curr1_reset_history Write any value to reset history. 76curr1_reset_history Write any value to reset history.
diff --git a/Documentation/hwmon/exynos4_tmu b/Documentation/hwmon/exynos4_tmu
new file mode 100644
index 000000000000..c3c6b41db607
--- /dev/null
+++ b/Documentation/hwmon/exynos4_tmu
@@ -0,0 +1,81 @@
1Kernel driver exynos4_tmu
2=================
3
4Supported chips:
5* ARM SAMSUNG EXYNOS4 series of SoC
6 Prefix: 'exynos4-tmu'
7 Datasheet: Not publicly available
8
9Authors: Donggeun Kim <dg77.kim@samsung.com>
10
11Description
12-----------
13
14This driver allows to read temperature inside SAMSUNG EXYNOS4 series of SoC.
15
16The chip only exposes the measured 8-bit temperature code value
17through a register.
18Temperature can be taken from the temperature code.
19There are three equations converting from temperature to temperature code.
20
21The three equations are:
22 1. Two point trimming
23 Tc = (T - 25) * (TI2 - TI1) / (85 - 25) + TI1
24
25 2. One point trimming
26 Tc = T + TI1 - 25
27
28 3. No trimming
29 Tc = T + 50
30
31 Tc: Temperature code, T: Temperature,
32 TI1: Trimming info for 25 degree Celsius (stored at TRIMINFO register)
33 Temperature code measured at 25 degree Celsius which is unchanged
34 TI2: Trimming info for 85 degree Celsius (stored at TRIMINFO register)
35 Temperature code measured at 85 degree Celsius which is unchanged
36
37TMU(Thermal Management Unit) in EXYNOS4 generates interrupt
38when temperature exceeds pre-defined levels.
39The maximum number of configurable threshold is four.
40The threshold levels are defined as follows:
41 Level_0: current temperature > trigger_level_0 + threshold
42 Level_1: current temperature > trigger_level_1 + threshold
43 Level_2: current temperature > trigger_level_2 + threshold
44 Level_3: current temperature > trigger_level_3 + threshold
45
46 The threshold and each trigger_level are set
47 through the corresponding registers.
48
49When an interrupt occurs, this driver notify user space of
50one of four threshold levels for the interrupt
51through kobject_uevent_env and sysfs_notify functions.
52Although an interrupt condition for level_0 can be set,
53it is not notified to user space through sysfs_notify function.
54
55Sysfs Interface
56---------------
57name name of the temperature sensor
58 RO
59
60temp1_input temperature
61 RO
62
63temp1_max temperature for level_1 interrupt
64 RO
65
66temp1_crit temperature for level_2 interrupt
67 RO
68
69temp1_emergency temperature for level_3 interrupt
70 RO
71
72temp1_max_alarm alarm for level_1 interrupt
73 RO
74
75temp1_crit_alarm
76 alarm for level_2 interrupt
77 RO
78
79temp1_emergency_alarm
80 alarm for level_3 interrupt
81 RO
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index a1790401fdde..c91a1d15fa28 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -12,26 +12,46 @@ Supported chips:
12 Addresses scanned: I2C 0x48 - 0x4f 12 Addresses scanned: I2C 0x48 - 0x4f
13 Datasheet: Publicly available at the National Semiconductor website 13 Datasheet: Publicly available at the National Semiconductor website
14 http://www.national.com/ 14 http://www.national.com/
15 * Dallas Semiconductor DS75 15 * Dallas Semiconductor DS75, DS1775
16 Prefix: 'lm75' 16 Prefixes: 'ds75', 'ds1775'
17 Addresses scanned: I2C 0x48 - 0x4f 17 Addresses scanned: none
18 Datasheet: Publicly available at the Dallas Semiconductor website
19 http://www.maxim-ic.com/
20 * Dallas Semiconductor DS1775
21 Prefix: 'lm75'
22 Addresses scanned: I2C 0x48 - 0x4f
23 Datasheet: Publicly available at the Dallas Semiconductor website 18 Datasheet: Publicly available at the Dallas Semiconductor website
24 http://www.maxim-ic.com/ 19 http://www.maxim-ic.com/
25 * Maxim MAX6625, MAX6626 20 * Maxim MAX6625, MAX6626
26 Prefix: 'lm75' 21 Prefixes: 'max6625', 'max6626'
27 Addresses scanned: I2C 0x48 - 0x4b 22 Addresses scanned: none
28 Datasheet: Publicly available at the Maxim website 23 Datasheet: Publicly available at the Maxim website
29 http://www.maxim-ic.com/ 24 http://www.maxim-ic.com/
30 * Microchip (TelCom) TCN75 25 * Microchip (TelCom) TCN75
31 Prefix: 'lm75' 26 Prefix: 'lm75'
32 Addresses scanned: I2C 0x48 - 0x4f 27 Addresses scanned: none
28 Datasheet: Publicly available at the Microchip website
29 http://www.microchip.com/
30 * Microchip MCP9800, MCP9801, MCP9802, MCP9803
31 Prefix: 'mcp980x'
32 Addresses scanned: none
33 Datasheet: Publicly available at the Microchip website 33 Datasheet: Publicly available at the Microchip website
34 http://www.microchip.com/ 34 http://www.microchip.com/
35 * Analog Devices ADT75
36 Prefix: 'adt75'
37 Addresses scanned: none
38 Datasheet: Publicly available at the Analog Devices website
39 http://www.analog.com/adt75
40 * ST Microelectronics STDS75
41 Prefix: 'stds75'
42 Addresses scanned: none
43 Datasheet: Publicly available at the ST website
44 http://www.st.com/internet/analog/product/121769.jsp
45 * Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275
46 Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275'
47 Addresses scanned: none
48 Datasheet: Publicly available at the Texas Instruments website
49 http://www.ti.com/product/tmp100
50 http://www.ti.com/product/tmp101
51 http://www.ti.com/product/tmp105
52 http://www.ti.com/product/tmp75
53 http://www.ti.com/product/tmp175
54 http://www.ti.com/product/tmp275
35 55
36Author: Frodo Looijaard <frodol@dds.nl> 56Author: Frodo Looijaard <frodol@dds.nl>
37 57
@@ -50,21 +70,16 @@ range of -55 to +125 degrees.
50The LM75 only updates its values each 1.5 seconds; reading it more often 70The LM75 only updates its values each 1.5 seconds; reading it more often
51will do no harm, but will return 'old' values. 71will do no harm, but will return 'old' values.
52 72
53The LM75 is usually used in combination with LM78-like chips, to measure 73The original LM75 was typically used in combination with LM78-like chips
54the temperature of the processor(s). 74on PC motherboards, to measure the temperature of the processor(s). Clones
55 75are now used in various embedded designs.
56The DS75, DS1775, MAX6625, and MAX6626 are supported as well.
57They are not distinguished from an LM75. While most of these chips
58have three additional bits of accuracy (12 vs. 9 for the LM75),
59the additional bits are not supported. Not only that, but these chips will
60not be detected if not in 9-bit precision mode (use the force parameter if
61needed).
62
63The TCN75 is supported as well, and is not distinguished from an LM75.
64 76
65The LM75 is essentially an industry standard; there may be other 77The LM75 is essentially an industry standard; there may be other
66LM75 clones not listed here, with or without various enhancements, 78LM75 clones not listed here, with or without various enhancements,
67that are supported. 79that are supported. The clones are not detected by the driver, unless
80they reproduce the exact register tricks of the original LM75, and must
81therefore be instantiated explicitly. The specific enhancements (such as
82higher resolution) are not currently supported by the driver.
68 83
69The LM77 is not supported, contrary to what we pretended for a long time. 84The LM77 is not supported, contrary to what we pretended for a long time.
70Both chips are simply not compatible, value encoding differs. 85Both chips are simply not compatible, value encoding differs.
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978
new file mode 100644
index 000000000000..c365f9beb5dd
--- /dev/null
+++ b/Documentation/hwmon/ltc2978
@@ -0,0 +1,103 @@
1Kernel driver ltc2978
2=====================
3
4Supported chips:
5 * Linear Technology LTC2978
6 Prefix: 'ltc2978'
7 Addresses scanned: -
8 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
9 * Linear Technology LTC3880
10 Prefix: 'ltc3880'
11 Addresses scanned: -
12 Datasheet: http://cds.linear.com/docs/Datasheet/3880f.pdf
13
14Author: Guenter Roeck <guenter.roeck@ericsson.com>
15
16
17Description
18-----------
19
20The LTC2978 is an octal power supply monitor, supervisor, sequencer and
21margin controller. The LTC3880 is a dual, PolyPhase DC/DC synchronous
22step-down switching regulator controller.
23
24
25Usage Notes
26-----------
27
28This driver does not probe for PMBus devices. You will have to instantiate
29devices explicitly.
30
31Example: the following commands will load the driver for an LTC2978 at address
320x60 on I2C bus #1:
33
34# modprobe ltc2978
35# echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device
36
37
38Sysfs attributes
39----------------
40
41in1_label "vin"
42in1_input Measured input voltage.
43in1_min Minimum input voltage.
44in1_max Maximum input voltage.
45in1_lcrit Critical minimum input voltage.
46in1_crit Critical maximum input voltage.
47in1_min_alarm Input voltage low alarm.
48in1_max_alarm Input voltage high alarm.
49in1_lcrit_alarm Input voltage critical low alarm.
50in1_crit_alarm Input voltage critical high alarm.
51in1_lowest Lowest input voltage. LTC2978 only.
52in1_highest Highest input voltage.
53in1_reset_history Reset history. Writing into this attribute will reset
54 history for all attributes.
55
56in[2-9]_label "vout[1-8]". Channels 3 to 9 on LTC2978 only.
57in[2-9]_input Measured output voltage.
58in[2-9]_min Minimum output voltage.
59in[2-9]_max Maximum output voltage.
60in[2-9]_lcrit Critical minimum output voltage.
61in[2-9]_crit Critical maximum output voltage.
62in[2-9]_min_alarm Output voltage low alarm.
63in[2-9]_max_alarm Output voltage high alarm.
64in[2-9]_lcrit_alarm Output voltage critical low alarm.
65in[2-9]_crit_alarm Output voltage critical high alarm.
66in[2-9]_lowest Lowest output voltage. LTC2978 only.
67in[2-9]_highest Lowest output voltage.
68in[2-9]_reset_history Reset history. Writing into this attribute will reset
69 history for all attributes.
70
71temp[1-3]_input Measured temperature.
72 On LTC2978, only one temperature measurement is
73 supported and reflects the internal temperature.
74 On LTC3880, temp1 and temp2 report external
75 temperatures, and temp3 reports the internal
76 temperature.
77temp[1-3]_min Mimimum temperature.
78temp[1-3]_max Maximum temperature.
79temp[1-3]_lcrit Critical low temperature.
80temp[1-3]_crit Critical high temperature.
81temp[1-3]_min_alarm Chip temperature low alarm.
82temp[1-3]_max_alarm Chip temperature high alarm.
83temp[1-3]_lcrit_alarm Chip temperature critical low alarm.
84temp[1-3]_crit_alarm Chip temperature critical high alarm.
85temp[1-3]_lowest Lowest measured temperature. LTC2978 only.
86temp[1-3]_highest Highest measured temperature.
87temp[1-3]_reset_history Reset history. Writing into this attribute will reset
88 history for all attributes.
89
90power[1-2]_label "pout[1-2]". LTC3880 only.
91power[1-2]_input Measured power.
92
93curr1_label "iin". LTC3880 only.
94curr1_input Measured input current.
95curr1_max Maximum input current.
96curr1_max_alarm Input current high alarm.
97
98curr[2-3]_label "iout[1-2]". LTC3880 only.
99curr[2-3]_input Measured input current.
100curr[2-3]_max Maximum input current.
101curr[2-3]_crit Critical input current.
102curr[2-3]_max_alarm Input current high alarm.
103curr[2-3]_crit_alarm Input current critical high alarm.
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
index c36c1c1a62bb..15ac911ce51b 100644
--- a/Documentation/hwmon/pmbus
+++ b/Documentation/hwmon/pmbus
@@ -8,11 +8,6 @@ Supported chips:
8 Addresses scanned: - 8 Addresses scanned: -
9 Datasheet: 9 Datasheet:
10 http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146395 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
16 * ON Semiconductor ADP4000, NCP4200, NCP4208 11 * ON Semiconductor ADP4000, NCP4200, NCP4208
17 Prefixes: 'adp4000', 'ncp4200', 'ncp4208' 12 Prefixes: 'adp4000', 'ncp4200', 'ncp4208'
18 Addresses scanned: - 13 Addresses scanned: -
@@ -20,6 +15,14 @@ Supported chips:
20 http://www.onsemi.com/pub_link/Collateral/ADP4000-D.PDF 15 http://www.onsemi.com/pub_link/Collateral/ADP4000-D.PDF
21 http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF 16 http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF
22 http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF 17 http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF
18 * Lineage Power
19 Prefixes: 'pdt003', 'pdt006', 'pdt012', 'udt020'
20 Addresses scanned: -
21 Datasheets:
22 http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf
23 http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf
24 http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf
25 http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf
23 * Generic PMBus devices 26 * Generic PMBus devices
24 Prefix: 'pmbus' 27 Prefix: 'pmbus'
25 Addresses scanned: - 28 Addresses scanned: -
diff --git a/Documentation/hwmon/pmbus-core b/Documentation/hwmon/pmbus-core
new file mode 100644
index 000000000000..31e4720fed18
--- /dev/null
+++ b/Documentation/hwmon/pmbus-core
@@ -0,0 +1,283 @@
1PMBus core driver and internal API
2==================================
3
4Introduction
5============
6
7[from pmbus.org] The Power Management Bus (PMBus) is an open standard
8power-management protocol with a fully defined command language that facilitates
9communication with power converters and other devices in a power system. The
10protocol is implemented over the industry-standard SMBus serial interface and
11enables programming, control, and real-time monitoring of compliant power
12conversion products. This flexible and highly versatile standard allows for
13communication between devices based on both analog and digital technologies, and
14provides true interoperability which will reduce design complexity and shorten
15time to market for power system designers. Pioneered by leading power supply and
16semiconductor companies, this open power system standard is maintained and
17promoted by the PMBus Implementers Forum (PMBus-IF), comprising 30+ adopters
18with the objective to provide support to, and facilitate adoption among, users.
19
20Unfortunately, while PMBus commands are standardized, there are no mandatory
21commands, and manufacturers can add as many non-standard commands as they like.
22Also, different PMBUs devices act differently if non-supported commands are
23executed. Some devices return an error, some devices return 0xff or 0xffff and
24set a status error flag, and some devices may simply hang up.
25
26Despite all those difficulties, a generic PMBus device driver is still useful
27and supported since kernel version 2.6.39. However, it was necessary to support
28device specific extensions in addition to the core PMBus driver, since it is
29simply unknown what new device specific functionality PMBus device developers
30come up with next.
31
32To make device specific extensions as scalable as possible, and to avoid having
33to modify the core PMBus driver repeatedly for new devices, the PMBus driver was
34split into core, generic, and device specific code. The core code (in
35pmbus_core.c) provides generic functionality. The generic code (in pmbus.c)
36provides support for generic PMBus devices. Device specific code is responsible
37for device specific initialization and, if needed, maps device specific
38functionality into generic functionality. This is to some degree comparable
39to PCI code, where generic code is augmented as needed with quirks for all kinds
40of devices.
41
42PMBus device capabilities auto-detection
43========================================
44
45For generic PMBus devices, code in pmbus.c attempts to auto-detect all supported
46PMBus commands. Auto-detection is somewhat limited, since there are simply too
47many variables to consider. For example, it is almost impossible to autodetect
48which PMBus commands are paged and which commands are replicated across all
49pages (see the PMBus specification for details on multi-page PMBus devices).
50
51For this reason, it often makes sense to provide a device specific driver if not
52all commands can be auto-detected. The data structures in this driver can be
53used to inform the core driver about functionality supported by individual
54chips.
55
56Some commands are always auto-detected. This applies to all limit commands
57(lcrit, min, max, and crit attributes) as well as associated alarm attributes.
58Limits and alarm attributes are auto-detected because there are simply too many
59possible combinations to provide a manual configuration interface.
60
61PMBus internal API
62==================
63
64The API between core and device specific PMBus code is defined in
65drivers/hwmon/pmbus/pmbus.h. In addition to the internal API, pmbus.h defines
66standard PMBus commands and virtual PMBus commands.
67
68Standard PMBus commands
69-----------------------
70
71Standard PMBus commands (commands values 0x00 to 0xff) are defined in the PMBUs
72specification.
73
74Virtual PMBus commands
75----------------------
76
77Virtual PMBus commands are provided to enable support for non-standard
78functionality which has been implemented by several chip vendors and is thus
79desirable to support.
80
81Virtual PMBus commands start with command value 0x100 and can thus easily be
82distinguished from standard PMBus commands (which can not have values larger
83than 0xff). Support for virtual PMBus commands is device specific and thus has
84to be implemented in device specific code.
85
86Virtual commands are named PMBUS_VIRT_xxx and start with PMBUS_VIRT_BASE. All
87virtual commands are word sized.
88
89There are currently two types of virtual commands.
90
91- READ commands are read-only; writes are either ignored or return an error.
92- RESET commands are read/write. Reading reset registers returns zero
93 (used for detection), writing any value causes the associated history to be
94 reset.
95
96Virtual commands have to be handled in device specific driver code. Chip driver
97code returns non-negative values if a virtual command is supported, or a
98negative error code if not. The chip driver may return -ENODATA or any other
99Linux error code in this case, though an error code other than -ENODATA is
100handled more efficiently and thus preferred. Either case, the calling PMBus
101core code will abort if the chip driver returns an error code when reading
102or writing virtual registers (in other words, the PMBus core code will never
103send a virtual command to a chip).
104
105PMBus driver information
106------------------------
107
108PMBus driver information, defined in struct pmbus_driver_info, is the main means
109for device specific drivers to pass information to the core PMBus driver.
110Specifically, it provides the following information.
111
112- For devices supporting its data in Direct Data Format, it provides coefficients
113 for converting register values into normalized data. This data is usually
114 provided by chip manufacturers in device datasheets.
115- Supported chip functionality can be provided to the core driver. This may be
116 necessary for chips which react badly if non-supported commands are executed,
117 and/or to speed up device detection and initialization.
118- Several function entry points are provided to support overriding and/or
119 augmenting generic command execution. This functionality can be used to map
120 non-standard PMBus commands to standard commands, or to augment standard
121 command return values with device specific information.
122
123 API functions
124 -------------
125
126 Functions provided by chip driver
127 ---------------------------------
128
129 All functions return the command return value (read) or zero (write) if
130 successful. A return value of -ENODATA indicates that there is no manufacturer
131 specific command, but that a standard PMBus command may exist. Any other
132 negative return value indicates that the commands does not exist for this
133 chip, and that no attempt should be made to read or write the standard
134 command.
135
136 As mentioned above, an exception to this rule applies to virtual commands,
137 which _must_ be handled in driver specific code. See "Virtual PMBus Commands"
138 above for more details.
139
140 Command execution in the core PMBus driver code is as follows.
141
142 if (chip_access_function) {
143 status = chip_access_function();
144 if (status != -ENODATA)
145 return status;
146 }
147 if (command >= PMBUS_VIRT_BASE) /* For word commands/registers only */
148 return -EINVAL;
149 return generic_access();
150
151 Chip drivers may provide pointers to the following functions in struct
152 pmbus_driver_info. All functions are optional.
153
154 int (*read_byte_data)(struct i2c_client *client, int page, int reg);
155
156 Read byte from page <page>, register <reg>.
157 <page> may be -1, which means "current page".
158
159 int (*read_word_data)(struct i2c_client *client, int page, int reg);
160
161 Read word from page <page>, register <reg>.
162
163 int (*write_word_data)(struct i2c_client *client, int page, int reg,
164 u16 word);
165
166 Write word to page <page>, register <reg>.
167
168 int (*write_byte)(struct i2c_client *client, int page, u8 value);
169
170 Write byte to page <page>, register <reg>.
171 <page> may be -1, which means "current page".
172
173 int (*identify)(struct i2c_client *client, struct pmbus_driver_info *info);
174
175 Determine supported PMBus functionality. This function is only necessary
176 if a chip driver supports multiple chips, and the chip functionality is not
177 pre-determined. It is currently only used by the generic pmbus driver
178 (pmbus.c).
179
180 Functions exported by core driver
181 ---------------------------------
182
183 Chip drivers are expected to use the following functions to read or write
184 PMBus registers. Chip drivers may also use direct I2C commands. If direct I2C
185 commands are used, the chip driver code must not directly modify the current
186 page, since the selected page is cached in the core driver and the core driver
187 will assume that it is selected. Using pmbus_set_page() to select a new page
188 is mandatory.
189
190 int pmbus_set_page(struct i2c_client *client, u8 page);
191
192 Set PMBus page register to <page> for subsequent commands.
193
194 int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
195
196 Read word data from <page>, <reg>. Similar to i2c_smbus_read_word_data(), but
197 selects page first.
198
199 int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg,
200 u16 word);
201
202 Write word data to <page>, <reg>. Similar to i2c_smbus_write_word_data(), but
203 selects page first.
204
205 int pmbus_read_byte_data(struct i2c_client *client, int page, u8 reg);
206
207 Read byte data from <page>, <reg>. Similar to i2c_smbus_read_byte_data(), but
208 selects page first. <page> may be -1, which means "current page".
209
210 int pmbus_write_byte(struct i2c_client *client, int page, u8 value);
211
212 Write byte data to <page>, <reg>. Similar to i2c_smbus_write_byte(), but
213 selects page first. <page> may be -1, which means "current page".
214
215 void pmbus_clear_faults(struct i2c_client *client);
216
217 Execute PMBus "Clear Fault" command on all chip pages.
218 This function calls the device specific write_byte function if defined.
219 Therefore, it must _not_ be called from that function.
220
221 bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
222
223 Check if byte register exists. Return true if the register exists, false
224 otherwise.
225 This function calls the device specific write_byte function if defined to
226 obtain the chip status. Therefore, it must _not_ be called from that function.
227
228 bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);
229
230 Check if word register exists. Return true if the register exists, false
231 otherwise.
232 This function calls the device specific write_byte function if defined to
233 obtain the chip status. Therefore, it must _not_ be called from that function.
234
235 int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
236 struct pmbus_driver_info *info);
237
238 Execute probe function. Similar to standard probe function for other drivers,
239 with the pointer to struct pmbus_driver_info as additional argument. Calls
240 identify function if supported. Must only be called from device probe
241 function.
242
243 void pmbus_do_remove(struct i2c_client *client);
244
245 Execute driver remove function. Similar to standard driver remove function.
246
247 const struct pmbus_driver_info
248 *pmbus_get_driver_info(struct i2c_client *client);
249
250 Return pointer to struct pmbus_driver_info as passed to pmbus_do_probe().
251
252
253PMBus driver platform data
254==========================
255
256PMBus platform data is defined in include/linux/i2c/pmbus.h. Platform data
257currently only provides a flag field with a single bit used.
258
259#define PMBUS_SKIP_STATUS_CHECK (1 << 0)
260
261struct pmbus_platform_data {
262 u32 flags; /* Device specific flags */
263};
264
265
266Flags
267-----
268
269PMBUS_SKIP_STATUS_CHECK
270
271During register detection, skip checking the status register for
272communication or command errors.
273
274Some PMBus chips respond with valid data when trying to read an unsupported
275register. For such chips, checking the status register is mandatory when
276trying to determine if a chip register exists or not.
277Other PMBus chips don't support the STATUS_CML register, or report
278communication errors for no explicable reason. For such chips, checking the
279status register must be disabled.
280
281Some i2c controllers do not support single-byte commands (write commands with
282no data, i2c_smbus_write_byte()). With such controllers, clearing the status
283register is impossible, and the PMBUS_SKIP_STATUS_CHECK flag must be set.
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100
new file mode 100644
index 000000000000..7617798b5c97
--- /dev/null
+++ b/Documentation/hwmon/zl6100
@@ -0,0 +1,125 @@
1Kernel driver zl6100
2====================
3
4Supported chips:
5 * Intersil / Zilker Labs ZL2004
6 Prefix: 'zl2004'
7 Addresses scanned: -
8 Datasheet: http://www.intersil.com/data/fn/fn6847.pdf
9 * Intersil / Zilker Labs ZL2006
10 Prefix: 'zl2006'
11 Addresses scanned: -
12 Datasheet: http://www.intersil.com/data/fn/fn6850.pdf
13 * Intersil / Zilker Labs ZL2008
14 Prefix: 'zl2008'
15 Addresses scanned: -
16 Datasheet: http://www.intersil.com/data/fn/fn6859.pdf
17 * Intersil / Zilker Labs ZL2105
18 Prefix: 'zl2105'
19 Addresses scanned: -
20 Datasheet: http://www.intersil.com/data/fn/fn6851.pdf
21 * Intersil / Zilker Labs ZL2106
22 Prefix: 'zl2106'
23 Addresses scanned: -
24 Datasheet: http://www.intersil.com/data/fn/fn6852.pdf
25 * Intersil / Zilker Labs ZL6100
26 Prefix: 'zl6100'
27 Addresses scanned: -
28 Datasheet: http://www.intersil.com/data/fn/fn6876.pdf
29 * Intersil / Zilker Labs ZL6105
30 Prefix: 'zl6105'
31 Addresses scanned: -
32 Datasheet: http://www.intersil.com/data/fn/fn6906.pdf
33
34Author: Guenter Roeck <guenter.roeck@ericsson.com>
35
36
37Description
38-----------
39
40This driver supports hardware montoring for Intersil / Zilker Labs ZL6100 and
41compatible digital DC-DC controllers.
42
43The driver is a client driver to the core PMBus driver. Please see
44Documentation/hwmon/pmbus and Documentation.hwmon/pmbus-core for details
45on PMBus client drivers.
46
47
48Usage Notes
49-----------
50
51This driver does not auto-detect devices. You will have to instantiate the
52devices explicitly. Please see Documentation/i2c/instantiating-devices for
53details.
54
55WARNING: Do not access chip registers using the i2cdump command, and do not use
56any of the i2ctools commands on a command register used to save and restore
57configuration data (0x11, 0x12, 0x15, 0x16, and 0xf4). The chips supported by
58this driver interpret any access to those command registers (including read
59commands) as request to execute the command in question. Unless write accesses
60to those registers are protected, this may result in power loss, board resets,
61and/or Flash corruption. Worst case, your board may turn into a brick.
62
63
64Platform data support
65---------------------
66
67The driver supports standard PMBus driver platform data.
68
69
70Module parameters
71-----------------
72
73delay
74-----
75
76Some Intersil/Zilker Labs DC-DC controllers require a minimum interval between
77I2C bus accesses. According to Intersil, the minimum interval is 2 ms, though
781 ms appears to be sufficient and has not caused any problems in testing.
79The problem is known to affect ZL6100, ZL2105, and ZL2008. It is known not to
80affect ZL2004 and ZL6105. The driver automatically sets the interval to 1 ms
81except for ZL2004 and ZL6105. To enable manual override, the driver provides a
82writeable module parameter, 'delay', which can be used to set the interval to
83a value between 0 and 65,535 microseconds.
84
85
86Sysfs entries
87-------------
88
89The following attributes are supported. Limits are read-write; all other
90attributes are read-only.
91
92in1_label "vin"
93in1_input Measured input voltage.
94in1_min Minimum input voltage.
95in1_max Maximum input voltage.
96in1_lcrit Critical minumum input voltage.
97in1_crit Critical maximum input voltage.
98in1_min_alarm Input voltage low alarm.
99in1_max_alarm Input voltage high alarm.
100in1_lcrit_alarm Input voltage critical low alarm.
101in1_crit_alarm Input voltage critical high alarm.
102
103in2_label "vout1"
104in2_input Measured output voltage.
105in2_lcrit Critical minumum output Voltage.
106in2_crit Critical maximum output voltage.
107in2_lcrit_alarm Critical output voltage critical low alarm.
108in2_crit_alarm Critical output voltage critical high alarm.
109
110curr1_label "iout1"
111curr1_input Measured output current.
112curr1_lcrit Critical minimum output current.
113curr1_crit Critical maximum output current.
114curr1_lcrit_alarm Output current critical low alarm.
115curr1_crit_alarm Output current critical high alarm.
116
117temp[12]_input Measured temperature.
118temp[12]_min Minimum temperature.
119temp[12]_max Maximum temperature.
120temp[12]_lcrit Critical low temperature.
121temp[12]_crit Critical high temperature.
122temp[12]_min_alarm Chip temperature low alarm.
123temp[12]_max_alarm Chip temperature high alarm.
124temp[12]_lcrit_alarm Chip temperature critical low alarm.
125temp[12]_crit_alarm Chip temperature critical high alarm.