aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/w83791d
diff options
context:
space:
mode:
authorCharles Spirakis <bezaur@gmail.com>2007-09-04 16:31:56 -0400
committerMark M. Hoffman <mhoffman@lightlink.com>2007-10-09 22:56:30 -0400
commit6438312367523b26bd628b60cfd16f25a7a6f7ae (patch)
tree70798f9f3d2c19993e227e1205861982ca636059 /Documentation/hwmon/w83791d
parent7b6d1f044d95395ca103bfb6869caa996fedbbd2 (diff)
hwmon: (w83791d) new sysfs beep/alarm methodology
Add new sysfs alarm methodology to w83791d driver Signed-off-by: Charles Spirakis <bezaur@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'Documentation/hwmon/w83791d')
-rw-r--r--Documentation/hwmon/w83791d96
1 files changed, 57 insertions, 39 deletions
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d
index db9881df88a5..f153b2f6d62c 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d
@@ -75,46 +75,64 @@ Voltage sensors (also known as IN sensors) report their values in millivolts.
75An alarm is triggered if the voltage has crossed a programmable minimum 75An alarm is triggered if the voltage has crossed a programmable minimum
76or maximum limit. 76or maximum limit.
77 77
78The bit ordering for the alarm "realtime status register" and the 78The w83791d has a global bit used to enable beeping from the speaker when an
79"beep enable registers" are different. 79alarm is triggered as well as a bitmask to enable or disable the beep for
80 80specific alarms. You need both the global beep enable bit and the
81in0 (VCORE) : alarms: 0x000001 beep_enable: 0x000001 81corresponding beep bit to be on for a triggered alarm to sound a beep.
82in1 (VINR0) : alarms: 0x000002 beep_enable: 0x002000 <== mismatch 82
83in2 (+3.3VIN): alarms: 0x000004 beep_enable: 0x000004 83The sysfs interface to the gloabal enable is via the sysfs beep_enable file.
84in3 (5VDD) : alarms: 0x000008 beep_enable: 0x000008 84This file is used for both legacy and new code.
85in4 (+12VIN) : alarms: 0x000100 beep_enable: 0x000100 85
86in5 (-12VIN) : alarms: 0x000200 beep_enable: 0x000200 86The sysfs interface to the beep bitmask has migrated from the original legacy
87in6 (-5VIN) : alarms: 0x000400 beep_enable: 0x000400 87method of a single sysfs beep_mask file to a newer method using multiple
88in7 (VSB) : alarms: 0x080000 beep_enable: 0x010000 <== mismatch 88*_beep files as described in .../Documentation/hwmon/sysfs-interface.
89in8 (VBAT) : alarms: 0x100000 beep_enable: 0x020000 <== mismatch 89
90in9 (VINR1) : alarms: 0x004000 beep_enable: 0x004000 90A similar change has occured for the bitmap corresponding to the alarms. The
91temp1 : alarms: 0x000010 beep_enable: 0x000010 91original legacy method used a single sysfs alarms file containing a bitmap
92temp2 : alarms: 0x000020 beep_enable: 0x000020 92of triggered alarms. The newer method uses multiple sysfs *_alarm files
93temp3 : alarms: 0x002000 beep_enable: 0x000002 <== mismatch 93(again following the pattern described in sysfs-interface).
94fan1 : alarms: 0x000040 beep_enable: 0x000040 94
95fan2 : alarms: 0x000080 beep_enable: 0x000080 95Since both methods read and write the underlying hardware, they can be used
96fan3 : alarms: 0x000800 beep_enable: 0x000800 96interchangeably and changes in one will automatically be reflected by
97fan4 : alarms: 0x200000 beep_enable: 0x200000 97the other. If you use the legacy bitmask method, your user-space code is
98fan5 : alarms: 0x400000 beep_enable: 0x400000 98responsible for handling the fact that the alarms and beep_mask bitmaps
99tart1 : alarms: 0x010000 beep_enable: 0x040000 <== mismatch 99are not the same (see the table below).
100tart2 : alarms: 0x020000 beep_enable: 0x080000 <== mismatch 100
101tart3 : alarms: 0x040000 beep_enable: 0x100000 <== mismatch 101NOTE: All new code should be written to use the newer sysfs-interface
102case_open : alarms: 0x001000 beep_enable: 0x001000 102specification as that avoids bitmap problems and is the preferred interface
103user_enable : alarms: -------- beep_enable: 0x800000 103going forward.
104 104
105*** NOTE: It is the responsibility of user-space code to handle the fact 105The driver reads the hardware chip values at most once every three seconds.
106that the beep enable and alarm bits are in different positions when using that 106User mode code requesting values more often will receive cached values.
107feature of the chip. 107
108 108Alarms bitmap vs. beep_mask bitmask
109When an alarm goes off, you can be warned by a beeping signal through your 109------------------------------------
110computer speaker. It is possible to enable all beeping globally, or only 110For legacy code using the alarms and beep_mask files:
111the beeping for some alarms. 111
112 112in0 (VCORE) : alarms: 0x000001 beep_mask: 0x000001
113The driver only reads the chip values each 3 seconds; reading them more 113in1 (VINR0) : alarms: 0x000002 beep_mask: 0x002000 <== mismatch
114often will do no harm, but will return 'old' values. 114in2 (+3.3VIN): alarms: 0x000004 beep_mask: 0x000004
115in3 (5VDD) : alarms: 0x000008 beep_mask: 0x000008
116in4 (+12VIN) : alarms: 0x000100 beep_mask: 0x000100
117in5 (-12VIN) : alarms: 0x000200 beep_mask: 0x000200
118in6 (-5VIN) : alarms: 0x000400 beep_mask: 0x000400
119in7 (VSB) : alarms: 0x080000 beep_mask: 0x010000 <== mismatch
120in8 (VBAT) : alarms: 0x100000 beep_mask: 0x020000 <== mismatch
121in9 (VINR1) : alarms: 0x004000 beep_mask: 0x004000
122temp1 : alarms: 0x000010 beep_mask: 0x000010
123temp2 : alarms: 0x000020 beep_mask: 0x000020
124temp3 : alarms: 0x002000 beep_mask: 0x000002 <== mismatch
125fan1 : alarms: 0x000040 beep_mask: 0x000040
126fan2 : alarms: 0x000080 beep_mask: 0x000080
127fan3 : alarms: 0x000800 beep_mask: 0x000800
128fan4 : alarms: 0x200000 beep_mask: 0x200000
129fan5 : alarms: 0x400000 beep_mask: 0x400000
130tart1 : alarms: 0x010000 beep_mask: 0x040000 <== mismatch
131tart2 : alarms: 0x020000 beep_mask: 0x080000 <== mismatch
132tart3 : alarms: 0x040000 beep_mask: 0x100000 <== mismatch
133case_open : alarms: 0x001000 beep_mask: 0x001000
134global_enable: alarms: -------- beep_mask: 0x800000 (modified via beep_enable)
115 135
116W83791D TODO: 136W83791D TODO:
117--------------- 137---------------
118Provide a patch for per-file alarms and beep enables as defined in the hwmon
119 documentation (Documentation/hwmon/sysfs-interface)
120Provide a patch for smart-fan control (still need appropriate motherboard/fans) 138Provide a patch for smart-fan control (still need appropriate motherboard/fans)