* [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5
@ 2006-10-18 20:09 Greg KH
2006-12-07 21:01 ` David Hubbard
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Greg KH @ 2006-10-18 20:09 UTC (permalink / raw)
To: lm-sensors
From: Rudolf Marek <r.marek at assembler.cz>
Fix the detection of fan5 and preserve the bit between the
register writes, because the bit is write only.
Signed-off-by: Rudolf Marek <r.marek at assembler.cz>
Signed-off-by: Jean Delvare <khali at linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
drivers/hwmon/w83627ehf.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 833faa2..2257806 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -354,6 +354,8 @@ static void w83627ehf_write_fan_div(stru
case 0:
reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0xcf)
| ((data->fan_div[0] & 0x03) << 4);
+ /* fan5 input control bit is write only, compute the value */
+ reg |= (data->has_fan & (1 << 4)) ? 1 : 0;
w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg);
reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xdf)
| ((data->fan_div[0] & 0x04) << 3);
@@ -362,6 +364,8 @@ static void w83627ehf_write_fan_div(stru
case 1:
reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0x3f)
| ((data->fan_div[1] & 0x03) << 6);
+ /* fan5 input control bit is write only, compute the value */
+ reg |= (data->has_fan & (1 << 4)) ? 1 : 0;
w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg);
reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xbf)
| ((data->fan_div[1] & 0x04) << 4);
@@ -1216,13 +1220,16 @@ static int w83627ehf_detect(struct i2c_a
superio_exit();
/* It looks like fan4 and fan5 pins can be alternatively used
- as fan on/off switches */
+ as fan on/off switches, but fan5 control is write only :/
+ We assume that if the serial interface is disabled, designers
+ connected fan5 as input unless they are emitting log 1, which
+ is not the default. */
data->has_fan = 0x07; /* fan1, fan2 and fan3 */
i = w83627ehf_read_value(client, W83627EHF_REG_FANDIV1);
if ((i & (1 << 2)) && (!fan4pin))
data->has_fan |= (1 << 3);
- if ((i & (1 << 0)) && (!fan5pin))
+ if (!(i & (1 << 1)) && (!fan5pin))
data->has_fan |= (1 << 4);
/* Register sysfs hooks */
--
1.4.2.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5
2006-10-18 20:09 [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5 Greg KH
@ 2006-12-07 21:01 ` David Hubbard
2006-12-07 21:06 ` Jean Delvare
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Hubbard @ 2006-12-07 21:01 UTC (permalink / raw)
To: lm-sensors
Hi Jean, Rudolf,
I'm doing bits and pieces of the w83627dhg driver, and I want to make
sure I test it on the latest patched w83627ehf driver. I believe this
is Rudolf's last patch, the last update to the driver. However, the
machine I develop on at home has a very slow internet connection, so I
have tried linux-2.6.18-mm2 and linux-2.6.19-rc3. Neither seems to
have that patch.
Has Rudolf's patch been pushed upstream? I'm replying on the thread
where Greg K received the patch. Sorry, this should be an easy one,
but I'm stuck.
Thanks,
David
^ permalink raw reply [flat|nested] 5+ messages in thread* [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5
2006-10-18 20:09 [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5 Greg KH
2006-12-07 21:01 ` David Hubbard
@ 2006-12-07 21:06 ` Jean Delvare
2006-12-09 12:17 ` Christian Mahr
2006-12-09 21:38 ` David Hubbard
3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2006-12-07 21:06 UTC (permalink / raw)
To: lm-sensors
Hi David,
On Thu, 7 Dec 2006 14:01:19 -0700, David Hubbard wrote:
> I'm doing bits and pieces of the w83627dhg driver, and I want to make
> sure I test it on the latest patched w83627ehf driver. I believe this
> is Rudolf's last patch, the last update to the driver. However, the
> machine I develop on at home has a very slow internet connection, so I
> have tried linux-2.6.18-mm2 and linux-2.6.19-rc3. Neither seems to
> have that patch.
>
> Has Rudolf's patch been pushed upstream? I'm replying on the thread
> where Greg K received the patch. Sorry, this should be an easy one,
> but I'm stuck.
The fan5 detection patch has been pushed upstream, it was merged in
2.6.19-rc3. There are no pending patches for the w83627ehf driver in my
tree so the version in 2.6.19-rc3 is the latest one.
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
* [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5
2006-10-18 20:09 [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5 Greg KH
2006-12-07 21:01 ` David Hubbard
2006-12-07 21:06 ` Jean Delvare
@ 2006-12-09 12:17 ` Christian Mahr
2006-12-09 21:38 ` David Hubbard
3 siblings, 0 replies; 5+ messages in thread
From: Christian Mahr @ 2006-12-09 12:17 UTC (permalink / raw)
To: lm-sensors
Hi David,
I always could read fans5 on my P5B wifi deluxe board.
I am still on 2.6.18.2 kernel with your version of w83627ehf driver (and
Rudolfs coretemp patch).
anything you want me to try out?
Christian
Am Donnerstag, 7. Dezember 2006 22:01 schrieb David Hubbard:
> Hi Jean, Rudolf,
>
> I'm doing bits and pieces of the w83627dhg driver, and I want to make
> sure I test it on the latest patched w83627ehf driver. I believe this
> is Rudolf's last patch, the last update to the driver. However, the
> machine I develop on at home has a very slow internet connection, so I
> have tried linux-2.6.18-mm2 and linux-2.6.19-rc3. Neither seems to
> have that patch.
>
> Has Rudolf's patch been pushed upstream? I'm replying on the thread
> where Greg K received the patch. Sorry, this should be an easy one,
> but I'm stuck.
>
> Thanks,
> David
>
> _______________________________________________
> lm-sensors mailing list
> lm-sensors at lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
___________________________________________________________
Der fr?he Vogel f?ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5
2006-10-18 20:09 [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5 Greg KH
` (2 preceding siblings ...)
2006-12-09 12:17 ` Christian Mahr
@ 2006-12-09 21:38 ` David Hubbard
3 siblings, 0 replies; 5+ messages in thread
From: David Hubbard @ 2006-12-09 21:38 UTC (permalink / raw)
To: lm-sensors
Hi Christian,
You have a w83627dhg, if I remember correctly. The current driver you
are probably using is the testing driver from the lm-sensors mailing
list in September. Although it functions correctly for the w83627dhg,
it does not correctly detect some of the w83627ehf chip revisions.
I've taken way too long to get the driver fixed so it can be added to
the kernel. Mostly that's because my work has become very intense for
the last few months -- I haven't been sleeping much. However,
w83627dhg support should be in a testing release of the kernel soon.
(Possibly 2.6.20)
David
On 12/9/06, Christian Mahr <christian.mahr.ulm at arcor.de> wrote:
> Hi David,
>
> I always could read fans5 on my P5B wifi deluxe board.
>
> I am still on 2.6.18.2 kernel with your version of w83627ehf driver (and
> Rudolfs coretemp patch).
> anything you want me to try out?
>
> Christian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-09 21:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 20:09 [lm-sensors] [PATCH 6/8] w83627ehf: Fix the detection of fan5 Greg KH
2006-12-07 21:01 ` David Hubbard
2006-12-07 21:06 ` Jean Delvare
2006-12-09 12:17 ` Christian Mahr
2006-12-09 21:38 ` David Hubbard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.