All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] I2C update for 2.6.9
Date: Tue, 19 Oct 2004 17:18:26 -0700	[thread overview]
Message-ID: <10982315063481@kroah.com> (raw)
In-Reply-To: <1098231506642@kroah.com>

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


  reply	other threads:[~2004-10-20  1:46 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20  0:16 [BK PATCH] I2C update for 2.6.9 Greg KH
2005-05-19  6:25 ` Greg KH
2004-10-20  0:18 ` [PATCH] " Greg KH
2004-10-20  0:18   ` Greg KH
2004-10-20  0:18     ` Greg KH
2004-10-20  0:18       ` Greg KH
2004-10-20  0:18         ` Greg KH
2004-10-20  0:18           ` Greg KH
2004-10-20  0:18             ` Greg KH
2004-10-20  0:18               ` Greg KH
2004-10-20  0:18                 ` Greg KH
2005-05-19  6:25                   ` Greg KH
2004-10-20  0:18                   ` Greg KH
2004-10-20  0:18                     ` Greg KH
2004-10-20  0:18                       ` Greg KH
2004-10-20  0:18                         ` Greg KH
2004-10-20  0:18                           ` Greg KH
2004-10-20  0:18                             ` Greg KH
2004-10-20  0:18                               ` Greg KH
2004-10-20  0:18                                 ` Greg KH
2004-10-20  0:18                                   ` Greg KH
2004-10-20  0:18                                     ` Greg KH
2004-10-20  0:18                                       ` Greg KH
2004-10-20  0:18                                         ` Greg KH
2004-10-20  0:18                                           ` Greg KH
2004-10-20  0:18                                             ` Greg KH [this message]
2004-10-20  0:18                                               ` Greg KH
2004-10-20  0:18                                                 ` Greg KH
2004-10-20  0:18                                                   ` Greg KH
2004-10-20  0:18                                                     ` Greg KH
2005-05-19  6:25                                                       ` Greg KH
2004-10-20  0:18                                                       ` Greg KH
2004-10-20  0:18                                                         ` Greg KH
2004-10-20  0:18                                                           ` Greg KH
2004-10-20  0:18                                                             ` Greg KH
2004-10-20  0:18                                                               ` Greg KH
2004-10-20  5:21                                                   ` Eugene Surovegin
2005-05-19  6:25                                                     ` Eugene Surovegin
2004-10-20  6:26                                                     ` [PATCH] fix recently introduced race in IBM PPC4xx I2C driver Eugene Surovegin
2005-05-19  6:25                                                       ` Eugene Surovegin
2004-10-22 19:55                                                       ` Greg KH
2005-05-19  6:25                                                         ` Greg KH
2004-10-25 18:29                                               ` [PATCH] I2C update for 2.6.9 Bill Davidsen
2005-05-19  6:25                                                 ` Bill Davidsen
2004-10-25 20:54                                                 ` Jean Delvare
2005-05-19  6:25                                                   ` Jean Delvare
2004-10-26 21:03                                                   ` Bill Davidsen
2005-05-19  6:25                                                     ` Bill Davidsen
2004-10-20 15:57 ` [BK PATCH] " Jean Delvare
2005-05-19  6:25   ` Jean Delvare
2004-10-20 16:40   ` Lee Revell
2005-05-19  6:25     ` Lee Revell
2004-10-22 21:34 ` Jean Delvare
2005-05-19  6:25   ` Jean Delvare

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=10982315063481@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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.