Commit 125751cb authored by Charles Spirakis's avatar Charles Spirakis Committed by Greg Kroah-Hartman

w83791d: Documentation update

w83791d: Documentation update

The alarm bits and the beep enable bits are in different positions in
the hardware. Document the problem and leave it to the user-space code
to handle the situation. When this driver is updated to the standardized
sysfs alarm/beep methodology, this won't be a problem.

This is a documentation only change.

Signed-off by: Charles Spirakis <bezaur@gmail.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2d45771e
...@@ -5,7 +5,7 @@ Supported chips: ...@@ -5,7 +5,7 @@ Supported chips:
* Winbond W83791D * Winbond W83791D
Prefix: 'w83791d' Prefix: 'w83791d'
Addresses scanned: I2C 0x2c - 0x2f Addresses scanned: I2C 0x2c - 0x2f
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791Da.pdf Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf
Author: Charles Spirakis <bezaur@gmail.com> Author: Charles Spirakis <bezaur@gmail.com>
...@@ -20,6 +20,9 @@ Credits: ...@@ -20,6 +20,9 @@ Credits:
Chunhao Huang <DZShen@Winbond.com.tw>, Chunhao Huang <DZShen@Winbond.com.tw>,
Rudolf Marek <r.marek@sh.cvut.cz> Rudolf Marek <r.marek@sh.cvut.cz>
Additional contributors:
Sven Anders <anders@anduras.de>
Module Parameters Module Parameters
----------------- -----------------
...@@ -46,7 +49,8 @@ Module Parameters ...@@ -46,7 +49,8 @@ Module Parameters
Description Description
----------- -----------
This driver implements support for the Winbond W83791D chip. This driver implements support for the Winbond W83791D chip. The W83791G
chip appears to be the same as the W83791D but is lead free.
Detection of the chip can sometimes be foiled because it can be in an Detection of the chip can sometimes be foiled because it can be in an
internal state that allows no clean access (Bank with ID register is not internal state that allows no clean access (Bank with ID register is not
...@@ -71,34 +75,36 @@ Voltage sensors (also known as IN sensors) report their values in millivolts. ...@@ -71,34 +75,36 @@ Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit. or maximum limit.
Alarms are provided as output from a "realtime status register". The The bit ordering for the alarm "realtime status register" and the
following bits are defined: "beep enable registers" are different.
bit - alarm on: in0 (VCORE) : alarms: 0x000001 beep_enable: 0x000001
0 - Vcore in1 (VINR0) : alarms: 0x000002 beep_enable: 0x002000 <== mismatch
1 - VINR0 in2 (+3.3VIN): alarms: 0x000004 beep_enable: 0x000004
2 - +3.3VIN in3 (5VDD) : alarms: 0x000008 beep_enable: 0x000008
3 - 5VDD in4 (+12VIN) : alarms: 0x000100 beep_enable: 0x000100
4 - temp1 in5 (-12VIN) : alarms: 0x000200 beep_enable: 0x000200
5 - temp2 in6 (-5VIN) : alarms: 0x000400 beep_enable: 0x000400
6 - fan1 in7 (VSB) : alarms: 0x080000 beep_enable: 0x010000 <== mismatch
7 - fan2 in8 (VBAT) : alarms: 0x100000 beep_enable: 0x020000 <== mismatch
8 - +12VIN in9 (VINR1) : alarms: 0x004000 beep_enable: 0x004000
9 - -12VIN temp1 : alarms: 0x000010 beep_enable: 0x000010
10 - -5VIN temp2 : alarms: 0x000020 beep_enable: 0x000020
11 - fan3 temp3 : alarms: 0x002000 beep_enable: 0x000002 <== mismatch
12 - chassis fan1 : alarms: 0x000040 beep_enable: 0x000040
13 - temp3 fan2 : alarms: 0x000080 beep_enable: 0x000080
14 - VINR1 fan3 : alarms: 0x000800 beep_enable: 0x000800
15 - reserved fan4 : alarms: 0x200000 beep_enable: 0x200000
16 - tart1 fan5 : alarms: 0x400000 beep_enable: 0x400000
17 - tart2 tart1 : alarms: 0x010000 beep_enable: 0x040000 <== mismatch
18 - tart3 tart2 : alarms: 0x020000 beep_enable: 0x080000 <== mismatch
19 - VSB tart3 : alarms: 0x040000 beep_enable: 0x100000 <== mismatch
20 - VBAT case_open : alarms: 0x001000 beep_enable: 0x001000
21 - fan4 user_enable : alarms: -------- beep_enable: 0x800000
22 - fan5
23 - reserved *** NOTE: It is the responsibility of user-space code to handle the fact
that the beep enable and alarm bits are in different positions when using that
feature of the chip.
When an alarm goes off, you can be warned by a beeping signal through your When an alarm goes off, you can be warned by a beeping signal through your
computer speaker. It is possible to enable all beeping globally, or only computer speaker. It is possible to enable all beeping globally, or only
...@@ -109,5 +115,6 @@ often will do no harm, but will return 'old' values. ...@@ -109,5 +115,6 @@ often will do no harm, but will return 'old' values.
W83791D TODO: W83791D TODO:
--------------- ---------------
Provide a patch for per-file alarms as discussed on the mailing list Provide a patch for per-file alarms and beep enables as defined in the hwmon
documentation (Documentation/hwmon/sysfs-interface)
Provide a patch for smart-fan control (still need appropriate motherboard/fans) Provide a patch for smart-fan control (still need appropriate motherboard/fans)
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
The w83791d chip appears to be part way between the 83781d and the The w83791d chip appears to be part way between the 83781d and the
83792d. Thus, this file is derived from both the w83792d.c and 83792d. Thus, this file is derived from both the w83792d.c and
w83781d.c files, but its output is more along the lines of the w83781d.c files.
83781d (which means there are no changes to the user-mode sensors
program which treats the 83791d as an 83781d). The w83791g chip is the same as the w83791d but lead-free.
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -1172,6 +1172,7 @@ static struct w83791d_data *w83791d_update_device(struct device *dev) ...@@ -1172,6 +1172,7 @@ static struct w83791d_data *w83791d_update_device(struct device *dev)
(w83791d_read(client, W83791D_REG_BEEP_CTRL[1]) << 8) + (w83791d_read(client, W83791D_REG_BEEP_CTRL[1]) << 8) +
(w83791d_read(client, W83791D_REG_BEEP_CTRL[2]) << 16); (w83791d_read(client, W83791D_REG_BEEP_CTRL[2]) << 16);
/* Extract global beep enable flag */
data->beep_enable = data->beep_enable =
(data->beep_mask >> GLOBAL_BEEP_ENABLE_SHIFT) & 0x01; (data->beep_mask >> GLOBAL_BEEP_ENABLE_SHIFT) & 0x01;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment