All of lore.kernel.org
 help / color / mirror / Atom feed
From: r.marek@sh.cvut.cz (Rudolf Marek)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] w83627ehf: Missing fan input and minor problems
Date: Fri, 15 Sep 2006 21:21:49 +0000	[thread overview]
Message-ID: <450B196D.7050501@sh.cvut.cz> (raw)
In-Reply-To: <1157458671.18988.34.camel@mhcln03>

Hi all,

Good news everyone, the mystery of fan5 is now uncloaked. It is short story. The
bit0 in reg 47 is write only and reads always 0.

> 1. register 47h: force AUXFANIN1 to act as a fan output
> 2. CR[0x24] bit 1. ENROM. The datasheet says a hardware reset is necessary.

Yes this is true, we have the code which detects this already in the
wmon-w83627ehf-add-pwm-support.patch

I have hacked together a patch that should solve the problem. It checks for the
ENROM as it was, later it checks bit 1 instead of bit 0 which is zero anyway.
Then all writes to reg 47 are modified so the bit0 is 1 if the ENROM is disabled.

The patch contains some schematics that is my idea how the pins are connected.
Problem is that we really never know if the pin is fan output or input because
we cannot read the bit :/

So bit1 means that output should be 1, this is not the default, so then I assume
this is not fan5 input and fan5 is disabled in driver.

If the pin is configured as output and the level in bit1 is set to 0, then bad
luck we will still think that it is input and the chip will be reprogrammed.

The schematics shows what will happen. The output of 0 will be switched to 1.
But there is no way how we can detect this. If there is really fan connected,
the side effect will be that the fan starts to spin ;) (if the polarity is set 1
on 0 off - it is mostly) The schematics shows the typical programmable I/O  pin.


All in all I think the usage as fan output for fan on/off is very very unlikely
and I have done what I could to detect if it is this way.

> P.S. Working on an updated w83627dhg patch!

Good.

Matthias, please can you check if the patch is working for you? There might be
some typos in code, please fix them if you can.

The patch should be applied on the top of:
http://khali.linux-fr.org/devel/i2c/linux-2.6/hwmon-w83627ehf-add-pwm-support.patch
http://khali.linux-fr.org/devel/i2c/linux-2.6/hwmon-unchecked-return-status-fixes-w83627ehf.patch

Thanks,
Rudolf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fan5fix.patch
Type: text/x-patch
Size: 2769 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060915/c0775b63/attachment.bin 

  parent reply	other threads:[~2006-09-15 21:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-05 12:17 [lm-sensors] w83627ehf: Missing fan input and minor problems w/ PWM Matthias Hentges
2006-09-05 14:55 ` [lm-sensors] w83627ehf: Missing fan input and minor problems w/ David Hubbard
2006-09-05 15:30 ` Matthias Hentges
2006-09-05 16:20 ` Jean Delvare
2006-09-06  5:40 ` David Hubbard
2006-09-06 11:53 ` Matthias Hentges
2006-09-06 14:01 ` Jean Delvare
2006-09-07 11:14 ` Matthias Hentges
2006-09-10 17:48 ` Jean Delvare
2006-09-10 18:04 ` Rudolf Marek
2006-09-10 19:15 ` Matthias Hentges
2006-09-10 21:31 ` Rudolf Marek
2006-09-14  5:26 ` David Hubbard
2006-09-15 21:21 ` Rudolf Marek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-19  7:11 [lm-sensors] w83627ehf: Missing fan input and minor problems Rudolf Marek
2006-09-20 18:37 Rudolf Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=450B196D.7050501@sh.cvut.cz \
    --to=r.marek@sh.cvut.cz \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.