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