linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Max Vozeler <max@hinterhof.net>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: linuxppc-dev@lists.ozlab.org
Subject: term_adt746x: Invert bit required on this Powerbook G4
Date: Wed, 4 Nov 2009 13:23:55 +0100	[thread overview]
Message-ID: <20091104122355.GA7269@quark.vpn.nusquama.org> (raw)

I installed Ubuntu 8.10 on this Powerbook G4 ("alu" I think) 
for a friend of mine. As soon as therm_adt746x got loaded, the 
fan turned into a noise steam engine. 

This was on Ubuntu's 2.6.31 kernel (2.6.31-14-powerpc) which 
includes 0512a9a8e277a9de2. I could reproduce it with latest
mainline as well.

The effect was just as Michel described in the changelog; The
fan was running while temps were well below any of the limits,
and it stopped only when I set ridiculously low limits.

[ 1087.141482] adt746x: version 1 (supported)
[ 1087.141495] adt746x: Thermostat bus: 1, address: 0x2e, limit_adjust: 0, fan_speed: -1
[ 1087.141503] sensor 0: HDD BOTTOMSIDE
[ 1087.141507] sensor 1: CPU TOPSIDE
[ 1087.141512] sensor 2: GPU ON DIE
[ 1087.161365] adt746x: ADT7460 initializing
[ 1087.165245] adt746x: Lowering max temperatures from 73, 80, 109 to 70, 50, 70
[ 1087.165261] adt746x: Setting speed to 0 for CPU TOPSIDE fan.
[ 1087.166302] adt746x: Setting speed to 0 for GPU ON DIE fan.

(What "worked" was limit_adjust=-30, fan did turn off, but so did
the Powerbook shortly after, despite being cold.)

After some poking around, in which everything seemed to be
according to plan including write of 0 to both FAN_SPD_SET regs,
I noticed that explicitly *setting* the invert bit as in 

 -		write_reg(th, MANUAL_MODE[fan],
 -			(manual|MANUAL_MASK) & (~INVERT_MASK));
 +		write_reg(th, MANUAL_MODE[fan],
 +			(manual|MANUAL_MASK|INVERT_MASK));

seems to cure it. The fan appears to behave normally now, it
turns on slowly when the temp limits are reached, otherwise it
stays off. The temperature is reasonable (ie, no too hot).

So, puzzeled, I checked the spec, and it appears very clear on
the question of invert: It should be off by default.

I'm about to give the laptop back to my friend, but I suppose I 
could borrow it for further tests if anyone could guide me how 
to dig further into this.

Any hw/openfirmware details interesting?

	Max

             reply	other threads:[~2009-11-05 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 12:23 Max Vozeler [this message]
2009-11-04 12:39 ` term_adt746x: Invert bit required on this Powerbook G4 Max Vozeler
2009-11-10 14:41 ` Michel Dänzer

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=20091104122355.GA7269@quark.vpn.nusquama.org \
    --to=max@hinterhof.net \
    --cc=linuxppc-dev@lists.ozlab.org \
    --cc=michel@daenzer.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).