linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fourth auto-fan control interface proposal
@ 2004-10-03 15:48 Jean Delvare
  2004-10-19 22:27 ` Greg KH
  2004-10-20  0:27 ` Giuseppe Bilotta
  0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2004-10-03 15:48 UTC (permalink / raw)
  To: LM Sensors; +Cc: Greg KH, LKML

Hi all,

Here comes my fourth (and hopefully last) sysfs interface proposal for
implementing auto-fan control in 2.6. Previous proposals have been
discussed here:

[1] http://archives.andrew.net.au/lm-sensors/msg07517.html
[2] http://archives.andrew.net.au/lm-sensors/msg08049.html
[3] http://archives.andrew.net.au/lm-sensors/msg18008.html

The interface is still made up of two parts: per fan temp channels
selection, and trip points selection. Changes from the third proposal:

pwm[1-*]_enable value 2 is now used to explicitely state the auto pwm
mode. This was proposed by Mark D. Studebaker [4].

[4] http://archives.andrew.net.au/lm-sensors/msg18011.html

Temp channels selection
=======================

Renamed files from fan[1-*]_auto_channels to
pwm[1-*]_auto_channels_temp. The change from fan tp pwm is to match the
recent renaming suggested by Mark M. Hoffman [5]. The "_temp" suffix is
to leave some room for a "_fan" suffix at a later time if new chips
drive auto pwm according to fan speeds instead of temperature.

[5] http://archives.andrew.net.au/lm-sensors/msg18797.html

Trip points
===========

Trip points are now numbered (point1, point2, etc...) instead of named
(_off, _min, _max, _full...). This solves the problem of various chips
having a different number of trip points. The interface is still chip
independent in that it doesn't require chip-specific knowledge to be
used by user-space apps.

The reason for this change is that newer chips tend to have more trip
points. the LM63 has 8, the LM93 has no less than 12. Also, I read in
the LM63 datasheet that ideal pwm vs temperature curve were parabolic in
shape. Seems hard to achieve this if we arbitrarily lock the number of
trip points to 3 ;)

I also introduced an optional hysteresis temperature for trip points.
The LM63 has this. Since it makes full sense I'd expect other chips to
propose this as well.

As before, there are two sets of files, each chip driver picks the one
matching its internal model: trip points are either temperature
channel-dependent (ADM1031...) or pwm channel-dependent (IT87xx...). If
we ever come accross fan speed-driven pwm outputs where trip points are
fan channel-dependent we may have to offer a third set of files. We'll
see when/if this happens.

I hope I have taken everyone's comments and advice into account and we
can make this interface proposal part of the sysfs interface standard
now. I'm sorry it took so long. Comments welcome.

Thanks.

Signed-off-by: Jean Delvare <khali@linux-fr.org>

--- linux-2.6.9-rc2-mm4/Documentation/i2c/sysfs-interface.orig	2004-10-03 16:42:09.000000000 +0200
+++ linux-2.6.9-rc2-mm4/Documentation/i2c/sysfs-interface	2004-10-03 17:43:13.000000000 +0200
@@ -138,6 +138,7 @@
 *******
 * PWM *
 *******
+
 pwm[1-3]	Pulse width modulation fan control.
 		Integer value in the range 0 to 255
 		Read/Write
@@ -147,9 +148,31 @@
 		Switch PWM on and off.
 		Not always present even if fan*_pwm is.
 		0 to turn off
-		1 to turn on
+		1 to turn on in manual mode
+		2 to turn on in automatic mode
 		Read/Write
 
+pwm[1-*]_auto_channels_temp
+		Select which temperature channels affect this PWM output in
+		auto mode. Bitfield, 1 is temp1, 2 is temp2, 4 is temp3 etc...
+		Which values are possible depend on the chip used.
+
+pwm[1-*]_auto_point[1-*]_pwm
+pwm[1-*]_auto_point[1-*]_temp
+pwm[1-*]_auto_point[1-*]_temp_hyst
+		Define the PWM vs temperature curve. Number of trip points is
+		chip-dependent. Use this for chips which associate trip points
+		to PWM output channels.
+
+OR
+
+temp[1-*]_auto_point[1-*]_pwm
+temp[1-*]_auto_point[1-*]_temp
+temp[1-*]_auto_point[1-*]_temp_hyst
+		Define the PWM vs temperature curve. Number of trip points is
+		chip-dependent. Use this for chips which associate trip points
+		to temperature channels.
+
 
 ****************
 * Temperatures *


-- 
Jean Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fourth auto-fan control interface proposal
  2004-10-03 15:48 Fourth auto-fan control interface proposal Jean Delvare
@ 2004-10-19 22:27 ` Greg KH
  2004-10-20  0:27 ` Giuseppe Bilotta
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-10-19 22:27 UTC (permalink / raw)
  To: LM Sensors; +Cc: LKML

On Sun, Oct 03, 2004 at 05:48:37PM +0200, Jean Delvare wrote:
> Hi all,
> 
> Here comes my fourth (and hopefully last) sysfs interface proposal for
> implementing auto-fan control in 2.6.

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fourth auto-fan control interface proposal
  2004-10-03 15:48 Fourth auto-fan control interface proposal Jean Delvare
  2004-10-19 22:27 ` Greg KH
@ 2004-10-20  0:27 ` Giuseppe Bilotta
  1 sibling, 0 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2004-10-20  0:27 UTC (permalink / raw)
  To: linux-kernel

Jean Delvare wrote:
> I hope I have taken everyone's comments and advice into account and we
> can make this interface proposal part of the sysfs interface standard
> now. I'm sorry it took so long. Comments welcome.

I only have a question. How does this 
integrate/cooperate/replace (if) with existing tools like, for 
example, the i8kutils package for the Dell Inspiron 8000 
series?

-- 
Giuseppe "Oblomov" Bilotta

Can't you see
It all makes perfect sense
Expressed in dollar and cents
Pounds shillings and pence
                  (Roger Waters)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-20  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-03 15:48 Fourth auto-fan control interface proposal Jean Delvare
2004-10-19 22:27 ` Greg KH
2004-10-20  0:27 ` Giuseppe Bilotta

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).