lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] I2C update for 2.6.9
Date
From
ChangeSet 1.2070, 2004/10/19 15:20:22-07:00, khali@linux-fr.org

[PATCH] I2C: Fourth auto-fan control interface proposal

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.


Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


Documentation/i2c/sysfs-interface | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletion(-)


diff -Nru a/Documentation/i2c/sysfs-interface b/Documentation/i2c/sysfs-interface
--- a/Documentation/i2c/sysfs-interface 2004-10-19 16:54:09 -07:00
+++ b/Documentation/i2c/sysfs-interface 2004-10-19 16:54:09 -07:00
@@ -138,6 +138,7 @@
*******
* PWM *
*******
+
pwm[1-3] Pulse width modulation fan control.
Integer value in the range 0 to 255
Read/Write
@@ -147,8 +148,30 @@
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.


****************
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:1.330 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site