From: Jorge Bernal <koke@amedias.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] therm_adt746x: smooth fan
Date: Wed, 26 Jan 2005 09:12:26 +0100 [thread overview]
Message-ID: <200501260912.27216.koke@amedias.org> (raw)
Hi all!
This patchs allows a smoother fan speed switching with therm_adt746x. Instead
of setting 0 or 128, it scales speed according to temperature.
It would be even better if I'd have more precise temp data, but I'm not sure
if it's even supported by the chip.
--- linux-source-2.6.9.orig/drivers/macintosh/therm_adt746x.c 2005-01-26 02:50:31.941528728 +0100
+++ linux-source-2.6.9/drivers/macintosh/therm_adt746x.c 2005-01-26 03:10:36.925343344 +0100
@@ -272,7 +272,10 @@
printk(KERN_INFO "adt746x: Limit exceeded by %d, setting speed to specified for %s.\n",
var, fan_number?"GPU":"CPU");
th->overriding[fan_number] = 0;
- write_fan_speed(th, fan_speed, fan_number);
+ if ((var > 2) && (var < 8))
+ write_fan_speed(th, (int)(fan_speed * var / 6), fan_number);
+ else
+ write_fan_speed(th, fan_speed, fan_number);
started = 1;
} else if (var < -1) {
/
next reply other threads:[~2005-01-26 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-26 8:12 Jorge Bernal [this message]
2005-01-26 13:03 ` Colin Leroy
2005-01-26 13:44 ` Jorge Bernal
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=200501260912.27216.koke@amedias.org \
--to=koke@amedias.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®