* Third auto-fan control interface proposal
@ 2005-05-19 6:25 Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi all,
Here is my third proposal for an common auto-fan control interface.
See these previous threads for the first and second proposals and
associated comments:
http://archives.andrew.net.au/lm-sensors/msg07517.html
http://archives.andrew.net.au/lm-sensors/msg08091.html
The interface is still made up of two parts: per fan temp channels
selection, and trip points selection.
Temp channels selection
===========
It looks like the possibility to select more than one temp channel for a
given fan controler is needed (Philip Pokorny), so we wouldn't simplify
this. As in the first proposal, the values would be bitfields, 1<<N =
temp channel N matters to compute the considered fan's speed.
Files :
fan1_auto_channels
fan2_auto_channels
Trip points
=====
Two distinct models exist: trip points set for a given fan, or trip
points set for a given temperature channels. Looks like there is no easy
conversion from one model to the other so this gives two possible sets
of files (each driver picks the one matching the hardware
implementation):
fan1_auto_temp_off
fan1_auto_temp_min
fan1_auto_temp_max
fan1_auto_pwm_min
fan1_auto_pwm_max
fan2_auto_temp_off
fan2_auto_temp_min
fan2_auto_temp_max
fan2_auto_pwm_min
fan2_auto_pwm_max
OR
temp1_auto_temp_off
temp1_auto_temp_min
temp1_auto_temp_max
temp1_auto_pwm_min
temp1_auto_pwm_max
temp2_auto_temp_off
temp2_auto_temp_min
temp2_auto_temp_max
temp2_auto_pwm_min
temp2_auto_pwm_max
temp3_auto_temp_off
temp3_auto_temp_min
temp3_auto_temp_max
temp3_auto_pwm_min
temp3_auto_pwm_max
3 trip points in any case, but only 5 values (pwm_off is implied as 0%).
Rules are:
if temp < off, fan is off
if off < temp < min, fan speed is either 0 or pwm_min (allows for
hysteresis)
if min < temp < max, fan speed is between pwm_min and pwm_max. Exact
value is left to the driver/hardware, but should be next to a weighted
average if possible.
if temp > max, fan goes to full speed (typically pwm = 100%).
Additional notes
========
1* For some reason, the adm1031 driver had auto_ as a prefix instead of
inside the names. I prefer my way because it clearly shows which element
the values are attached to. OTOH I agree that "filtering" files with
"ls" is somewhat easier with auto as the prefix (especially if you do
*not* want to see the auto-fan files). No strong opinion actually.
2* As Mark Hoffman and Mark Studebaker noticed, this interface will
necessarily leave extra features or modes behind. Thus, this interface
should be considered non-limitative and subject to further extensions as
additional common patterns show among various chips. In particular,
driver authors should be free to:
- not implement this interface if the chip design is too different
- implement a different interface if they think it's needed
(additionally or exclusively)
The other interface (or additions to the standard interface) should be
prefixed in such a way that it won't collide with a further extension
of the standard interface (until the feature is actually discussed and
standardized).
All in all, this interface is meant for chips those implementations
roughly fit into it, and that's about it.
Comments, anyone?
Thanks,
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Mark Studebaker
@ 2005-05-19 6:25 ` Mark Studebaker
2005-05-19 6:25 ` Jean Delvare
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Mark Studebaker @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
We also need a way to turn the whole thing on.
I propose we use a new value of 2 in fan[1-3]_pwm_enable to turn on auto-fan.
I like the second model. It's for adm1031, etc.
I don't understand the first model. what drivers is it for?
Jean Delvare wrote:
> Hi all,
>
> Here is my third proposal for an common auto-fan control interface.
>
> See these previous threads for the first and second proposals and
> associated comments:
> http://archives.andrew.net.au/lm-sensors/msg07517.html
> http://archives.andrew.net.au/lm-sensors/msg08091.html
>
> The interface is still made up of two parts: per fan temp channels
> selection, and trip points selection.
>
> Temp channels selection
> ===========>
> It looks like the possibility to select more than one temp channel for a
> given fan controler is needed (Philip Pokorny), so we wouldn't simplify
> this. As in the first proposal, the values would be bitfields, 1<<N =
> temp channel N matters to compute the considered fan's speed.
>
> Files :
>
> fan1_auto_channels
> fan2_auto_channels
> q
> Trip points
> =====>
> Two distinct models exist: trip points set for a given fan, or trip
> points set for a given temperature channels. Looks like there is no easy
> conversion from one model to the other so this gives two possible sets
> of files (each driver picks the one matching the hardware
> implementation):
>
> fan1_auto_temp_off
> fan1_auto_temp_min
> fan1_auto_temp_max
> fan1_auto_pwm_min
> fan1_auto_pwm_max
> fan2_auto_temp_off
> fan2_auto_temp_min
> fan2_auto_temp_max
> fan2_auto_pwm_min
> fan2_auto_pwm_max
>
> OR
>
> temp1_auto_temp_off
> temp1_auto_temp_min
> temp1_auto_temp_max
> temp1_auto_pwm_min
> temp1_auto_pwm_max
> temp2_auto_temp_off
> temp2_auto_temp_min
> temp2_auto_temp_max
> temp2_auto_pwm_min
> temp2_auto_pwm_max
> temp3_auto_temp_off
> temp3_auto_temp_min
> temp3_auto_temp_max
> temp3_auto_pwm_min
> temp3_auto_pwm_max
>
> 3 trip points in any case, but only 5 values (pwm_off is implied as 0%).
> Rules are:
> if temp < off, fan is off
> if off < temp < min, fan speed is either 0 or pwm_min (allows for
> hysteresis)
> if min < temp < max, fan speed is between pwm_min and pwm_max. Exact
> value is left to the driver/hardware, but should be next to a weighted
> average if possible.
> if temp > max, fan goes to full speed (typically pwm = 100%).
>
> Additional notes
> ========
>
> 1* For some reason, the adm1031 driver had auto_ as a prefix instead of
> inside the names. I prefer my way because it clearly shows which element
> the values are attached to. OTOH I agree that "filtering" files with
> "ls" is somewhat easier with auto as the prefix (especially if you do
> *not* want to see the auto-fan files). No strong opinion actually.
>
> 2* As Mark Hoffman and Mark Studebaker noticed, this interface will
> necessarily leave extra features or modes behind. Thus, this interface
> should be considered non-limitative and subject to further extensions as
> additional common patterns show among various chips. In particular,
> driver authors should be free to:
> - not implement this interface if the chip design is too different
> - implement a different interface if they think it's needed
> (additionally or exclusively)
>
> The other interface (or additions to the standard interface) should be
> prefixed in such a way that it won't collide with a further extension
> of the standard interface (until the feature is actually discussed and
> standardized).
>
> All in all, this interface is meant for chips those implementations
> roughly fit into it, and that's about it.
>
> Comments, anyone?
>
> Thanks,
> Jean Delvare
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (2 preceding siblings ...)
2005-05-19 6:25 ` Mark Studebaker
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> We also need a way to turn the whole thing on.
> I propose we use a new value of 2 in fan[1-3]_pwm_enable to turn on
> auto-fan.
fanN_auto_channels does that already. Value 0 = all bits cleared = fan
speed doesn't depend on temperature, i.e. auto mode disabled.
> I like the second model. It's for adm1031, etc.
True.
> I don't understand the first model. what drivers is it for?
IT87xx if I remember correctly.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Mark Studebaker
2005-05-19 6:25 ` Mark Studebaker
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Mark Studebaker @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
if that's the case, then when auto_channels is on, pwm_enable must be zero, one, or don't care?
(in other words, does the pwmconfig script need to change?)
Using pwm_enable as a master configure (off/manual/auto) makes sense to me.
Jean Delvare wrote:
>>We also need a way to turn the whole thing on.
>>I propose we use a new value of 2 in fan[1-3]_pwm_enable to turn on
>>auto-fan.
>
>
> fanN_auto_channels does that already. Value 0 = all bits cleared = fan
> speed doesn't depend on temperature, i.e. auto mode disabled.
>
>
>>I like the second model. It's for adm1031, etc.
>
>
> True.
>
>
>>I don't understand the first model. what drivers is it for?
>
>
> IT87xx if I remember correctly.
>
I don't see how this maps to it87 very well.
In it87, just like the others, the temperature controls the fans,
not vice versa. It's just that the pwm values are selected discretely.
Your naming implied to me that the fan controls the temperature
for it87??? confusing to me anyway.
Shouldn't it87 use the same model as the others, with some additional
entries if necessary?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Mark Studebaker
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> if that's the case, then when auto_channels is on, pwm_enable must be
> zero, one, or don't care?(in other words, does the pwmconfig script
> need to change?) Using pwm_enable as a master configure
> (off/manual/auto) makes sense to me.
I thought that pwm_enable would be the master command, ie:
pwm = 0: fan to full speed
pwm = 1, auto_channels = 0: manual pwm
pwm = 1, auto_channels > 0: auto pwm
But I didn't consider the pwm scripts. Would it be complicated to update
these scripts according to the model I propose?
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (3 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Just noticed that I never anwsered this point:
> I don't see how this maps to it87 very well.
> In it87, just like the others, the temperature controls the fans,
> not vice versa. It's just that the pwm values are selected discretely.
> Your naming implied to me that the fan controls the temperature
> for it87??? confusing to me anyway.
> Shouldn't it87 use the same model as the others, with some additional
> entries if necessary?
The IT87xx does of course adapt fan speeds to the temperatures, not the
other way around (it a hardware monitor, not an oven ;)). The difference
with the ADM1031 is in how the fan speed is computed.
For the ADM1031, each temperature channels has its trip points. You use
them to compute a (virtual) fan speed, then for each fan, see which
temperature channels are linked to it, and pick the faster speed.
For the IT87xx, each *fan* (not temperature channel) has its trip
points. You use the fan vs. temperature mapping to find which
temperatures apply to this fan, pick the hottest temperature, and
determine the fan speed for that temperature.
The trick is that a fan can be driven by more than one temperature, and
one temperature can drive more than just one fan, which makes things
kinda complex, and, more importantly, makes both models incompatible as
far as I can see.
Feel free to read the IT87xx and ADM1031 datasheets again to confirm
that my descriptions of both chips are OK.
If you think it is possible to merge both models in a single interface,
let me know. I couldn't find a way. Or, if there is a way, it's so
complex that we would make the drivers unreadable, and we don't want to
do that, do we? And even then it's not perfect, IIRC.
I would like to propose a Documentation/i2c/sysfs-interface update quite
soon now, we have delayed this for too long already (although I am not
the only one to blame here - anyone can do it). The it87 and w83627hf
drivers have people interested in adding auto-fan control support, and
are basically blocked by the lack of standardized interface.
One point which was still debated is whether pwm_enable should have
value 2 in auto mode (MDS' proposal), or if we would simply rely on a
non-empty temperature vs. fan mapping to mean that auto mode is enabled
(my original proposal). Now that I come to think of it, I think that's
MDS' way is better, because it's more likely to match the chips
internals, and that way we can remember the temperature vs. fan mappings
when not in non-auto mode. It also makes it more clear that pwm_enable
is the master control. Comments?
Thanks.
--
Jean "Khali" Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (10 preceding siblings ...)
2005-05-19 6:25 ` Mark M. Hoffman
@ 2005-05-19 6:25 ` Mark M. Hoffman
11 siblings, 0 replies; 13+ messages in thread
From: Mark M. Hoffman @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hello:
* Jean Delvare <khali@linux-fr.org> [2004-07-05 16:49:45 +0200]:
<snip>
> It looks like the possibility to select more than one temp channel for a
> given fan controler is needed (Philip Pokorny), so we wouldn't simplify
> this. As in the first proposal, the values would be bitfields, 1<<N =
> temp channel N matters to compute the considered fan's speed.
>
> Files :
>
> fan1_auto_channels
> fan2_auto_channels
<snip>
I think these should be named e.g. pwm1_auto_channels to make clear
the distinction between a tacho input (fanX) and a pwm output (pwmX).
(/me goes off to look at 2.6 sysfs_interface doc again)
Oh dear. I'm sorry I wasn't paying attention to this sooner, but I
think our interface needs revision again. All of the fan[nr]_pwm*
files should really just be pwm[nr]*.
The association between tacho input and pwm output is arbitrary and
depends on mainboard maker. E.g. our script prog/pwm/pwmconfig is
made to discover the relationships.
Would anyone object to such a patch for 2.6 kernel drivers?
* * * * *
This also seems like a good time to introduce an idea that Khali
and I discussed on IRC some days ago, actually, a rule-of-thumb:
Any patch to the 2.6 kernel which changes/breaks some part of the
documented sysfs interface must be accompanied by a patch to
libsensors. The libsensors patch must preserve backwards compat.
to the sysfs interface as it existed in every kernel.org kernel
from 2.6.5-rc1 to present.
I'm not suggesting we support forward-compat... nobody should
complain if, after upgrading to a newer kernel, they are asked
to upgrade to a newer libsensors.
We've had sort of a honeymoon period where we could change the 2.6
kernel interface at will, and not support older ones with our current
libsensors. That pissed some people off, and now that distros are
releasing not-quite-current 2.6 kernels, it's a real PIA all around.
So, let's declare the honeymoon over.
Regards,
--
Mark M. Hoffman
mhoffman@lightlink.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (5 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` James Olin Oden
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> I think these should be named e.g. pwm1_auto_channels to make clear
> the distinction between a tacho input (fanX) and a pwm output (pwmX).
>
> (/me goes off to look at 2.6 sysfs_interface doc again)
>
> Oh dear. I'm sorry I wasn't paying attention to this sooner, but I
> think our interface needs revision again. All of the fan[nr]_pwm*
> files should really just be pwm[nr]*.
>
> The association between tacho input and pwm output is arbitrary and
> depends on mainboard maker. E.g. our script prog/pwm/pwmconfig is
> made to discover the relationships.
>
> Would anyone object to such a patch for 2.6 kernel drivers?
I wish someone noticed that *before* I did the change the other way
around back in version 2.6.5...
I'm not sure I agree with you. Old chips clearly had PWM outputs and
tachometers unlinked, but newer chips (Analog ADM1031, SMSC LPC47M1xx,
National PC8736x) clearly assume that pwmN and fanN refer to the same
physical fan. Of course, some motherboard manufacturers will ignore that
recommendation, but they are to blame. For example, the SMSC LPC47M1xx
chips will stop monitoring fan1 when pwm1 is enabled and has a duty
cycle of 0%. Thus the driver has to force fan1 to 0 in this case. If the
manufacturer used fan1 and pwm1 for different fans, then the monitored
fan cannot be monitored anymore when the controlled fan is turned off.
Are there examples of recent chips which obviously don't consider that
pwmN and fanN are linked? For example chips having a different count of
tachometers and PWM outputs?
If fanN and pwmN match like 90% of the time and the trend is to increase
that rate even more, then changing the names again now doesn't make much
sense (IMHO). But since I am the one who broke the interface in the
first place, I guess that my opinion doesn't really matter here.
> This also seems like a good time to introduce an idea that Khali
> and I discussed on IRC some days ago, actually, a rule-of-thumb:
>
> Any patch to the 2.6 kernel which changes/breaks some part of the
> documented sysfs interface must be accompanied by a patch to
> libsensors. The libsensors patch must preserve backwards compat.
> to the sysfs interface as it existed in every kernel.org kernel
> from 2.6.5-rc1 to present.
>
> I'm not suggesting we support forward-compat... nobody should
> complain if, after upgrading to a newer kernel, they are asked
> to upgrade to a newer libsensors.
>
> We've had sort of a honeymoon period where we could change the 2.6
> kernel interface at will, and not support older ones with our current
> libsensors. That pissed some people off, and now that distros are
> releasing not-quite-current 2.6 kernels, it's a real PIA all around.
> So, let's declare the honeymoon over.
Agreed. If you failed to notice, I've already added the needed code in
libsensors. Basically it lets you define 2 sysfs files instead of 1 for
each symbol. Both files are tried in turn, and the operation fails if
both files are missing. I have not defined an alternate magnitude yet,
because I doubt we'll need it, but this could be added if needed.
This change in libsensors isn't exactly elegant, but the previous code
wasn't either, and it was actually less complex that I first feared.
I've already included the in0_ref <-> cpu0_vid compatibility, although
the 2.6 drivers have not been updated yet. The in0_ref name was one
other unnoticed mistake I made back in version 2.6.5 or so. And this
time I definitely agree that we can never say which "in" channel will be
used for vcore monitoring, since even on recent chips the motherboard
manufacturers don't follow the recommendations.
There's also a lm83-specific compatibility rule for critical temperature
- driver update has already been sent to Greg.
Thanks.
--
Jean "Khali" Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (8 preceding siblings ...)
2005-05-19 6:25 ` Mark M. Hoffman
@ 2005-05-19 6:25 ` Greg KH
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Mark M. Hoffman
11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
On Wed, Aug 11, 2004 at 04:03:01PM -0400, Mark M. Hoffman wrote:
> Hello:
>
> * Jean Delvare <khali@linux-fr.org> [2004-07-05 16:49:45 +0200]:
>
> <snip>
>
> > It looks like the possibility to select more than one temp channel for a
> > given fan controler is needed (Philip Pokorny), so we wouldn't simplify
> > this. As in the first proposal, the values would be bitfields, 1<<N =
> > temp channel N matters to compute the considered fan's speed.
> >
> > Files :
> >
> > fan1_auto_channels
> > fan2_auto_channels
>
> <snip>
>
> I think these should be named e.g. pwm1_auto_channels to make clear
> the distinction between a tacho input (fanX) and a pwm output (pwmX).
>
> (/me goes off to look at 2.6 sysfs_interface doc again)
>
> Oh dear. I'm sorry I wasn't paying attention to this sooner, but I
> think our interface needs revision again. All of the fan[nr]_pwm*
> files should really just be pwm[nr]*.
>
> The association between tacho input and pwm output is arbitrary and
> depends on mainboard maker. E.g. our script prog/pwm/pwmconfig is
> made to discover the relationships.
>
> Would anyone object to such a patch for 2.6 kernel drivers?
I'll let you and Jean argue this out :)
> Any patch to the 2.6 kernel which changes/breaks some part of the
> documented sysfs interface must be accompanied by a patch to
> libsensors. The libsensors patch must preserve backwards compat.
> to the sysfs interface as it existed in every kernel.org kernel
> from 2.6.5-rc1 to present.
That sounds good to me.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (7 preceding siblings ...)
2005-05-19 6:25 ` James Olin Oden
@ 2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Greg KH
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Mark M. Hoffman @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi Jean:
* Jean Delvare <khali@linux-fr.org> [2004-08-11 22:26:16 +0200]:
> > I think these should be named e.g. pwm1_auto_channels to make clear
> > the distinction between a tacho input (fanX) and a pwm output (pwmX).
> >
> > (/me goes off to look at 2.6 sysfs_interface doc again)
> >
> > Oh dear. I'm sorry I wasn't paying attention to this sooner, but I
> > think our interface needs revision again. All of the fan[nr]_pwm*
> > files should really just be pwm[nr]*.
> >
> > The association between tacho input and pwm output is arbitrary and
> > depends on mainboard maker. E.g. our script prog/pwm/pwmconfig is
> > made to discover the relationships.
> >
> > Would anyone object to such a patch for 2.6 kernel drivers?
>
> I wish someone noticed that *before* I did the change the other way
> around back in version 2.6.5...
>
> I'm not sure I agree with you. Old chips clearly had PWM outputs and
> tachometers unlinked, but newer chips (Analog ADM1031, SMSC LPC47M1xx,
> National PC8736x) clearly assume that pwmN and fanN refer to the same
> physical fan. Of course, some motherboard manufacturers will ignore that
> recommendation, but they are to blame. For example, the SMSC LPC47M1xx
> chips will stop monitoring fan1 when pwm1 is enabled and has a duty
> cycle of 0%. Thus the driver has to force fan1 to 0 in this case. If the
> manufacturer used fan1 and pwm1 for different fans, then the monitored
> fan cannot be monitored anymore when the controlled fan is turned off.
>
> Are there examples of recent chips which obviously don't consider that
> pwmN and fanN are linked? For example chips having a different count of
> tachometers and PWM outputs?
Yeah, LM93... four tachos, two PWM outputs. Odd, but it seems like one
anticipated configuration is to drive fans 1-2 (tacho's 1-2) *both*
from pwm1. I could be wrong about that though.
> If fanN and pwmN match like 90% of the time and the trend is to increase
> that rate even more, then changing the names again now doesn't make much
> sense (IMHO). But since I am the one who broke the interface in the
> first place, I guess that my opinion doesn't really matter here.
Well, it is just a name, so I don't feel too strongly about it.
> > This also seems like a good time to introduce an idea that Khali
> > and I discussed on IRC some days ago, actually, a rule-of-thumb:
> >
> > Any patch to the 2.6 kernel which changes/breaks some part of the
> > documented sysfs interface must be accompanied by a patch to
> > libsensors. The libsensors patch must preserve backwards compat.
> > to the sysfs interface as it existed in every kernel.org kernel
> > from 2.6.5-rc1 to present.
> >
> > I'm not suggesting we support forward-compat... nobody should
> > complain if, after upgrading to a newer kernel, they are asked
> > to upgrade to a newer libsensors.
> >
> > We've had sort of a honeymoon period where we could change the 2.6
> > kernel interface at will, and not support older ones with our current
> > libsensors. That pissed some people off, and now that distros are
> > releasing not-quite-current 2.6 kernels, it's a real PIA all around.
> > So, let's declare the honeymoon over.
>
> Agreed. If you failed to notice, I've already added the needed code in
> libsensors. Basically it lets you define 2 sysfs files instead of 1 for
> each symbol. Both files are tried in turn, and the operation fails if
> both files are missing. I have not defined an alternate magnitude yet,
> because I doubt we'll need it, but this could be added if needed.
I did notice - thanks, btw.
> This change in libsensors isn't exactly elegant, but the previous code
> wasn't either, and it was actually less complex that I first feared.
>
> I've already included the in0_ref <-> cpu0_vid compatibility, although
> the 2.6 drivers have not been updated yet. The in0_ref name was one
> other unnoticed mistake I made back in version 2.6.5 or so. And this
> time I definitely agree that we can never say which "in" channel will be
> used for vcore monitoring, since even on recent chips the motherboard
> manufacturers don't follow the recommendations.
>
> There's also a lm83-specific compatibility rule for critical temperature
> - driver update has already been sent to Greg.
Regards,
--
Mark M. Hoffman
mhoffman@lightlink.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (6 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` James Olin Oden
2005-05-19 6:25 ` Mark M. Hoffman
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: James Olin Oden @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
On Wed, 11 Aug 2004, Mark M. Hoffman wrote:
> Hi Jean:
>
> * Jean Delvare <khali@linux-fr.org> [2004-08-11 22:26:16 +0200]:
> > > I think these should be named e.g. pwm1_auto_channels to make clear
> > > the distinction between a tacho input (fanX) and a pwm output (pwmX).
> > >
> > > (/me goes off to look at 2.6 sysfs_interface doc again)
> > >
> > > Oh dear. I'm sorry I wasn't paying attention to this sooner, but I
> > > think our interface needs revision again. All of the fan[nr]_pwm*
> > > files should really just be pwm[nr]*.
> > >
> > > The association between tacho input and pwm output is arbitrary and
> > > depends on mainboard maker. E.g. our script prog/pwm/pwmconfig is
> > > made to discover the relationships.
> > >
> > > Would anyone object to such a patch for 2.6 kernel drivers?
> >
> > I wish someone noticed that *before* I did the change the other way
> > around back in version 2.6.5...
> >
> > I'm not sure I agree with you. Old chips clearly had PWM outputs and
> > tachometers unlinked, but newer chips (Analog ADM1031, SMSC LPC47M1xx,
> > National PC8736x) clearly assume that pwmN and fanN refer to the same
> > physical fan. Of course, some motherboard manufacturers will ignore that
> > recommendation, but they are to blame. For example, the SMSC LPC47M1xx
> > chips will stop monitoring fan1 when pwm1 is enabled and has a duty
> > cycle of 0%. Thus the driver has to force fan1 to 0 in this case. If the
> > manufacturer used fan1 and pwm1 for different fans, then the monitored
> > fan cannot be monitored anymore when the controlled fan is turned off.
> >
> > Are there examples of recent chips which obviously don't consider that
> > pwmN and fanN are linked? For example chips having a different count of
> > tachometers and PWM outputs?
>
> Yeah, LM93... four tachos, two PWM outputs. Odd, but it seems like one
> anticipated configuration is to drive fans 1-2 (tacho's 1-2) *both*
> from pwm1. I could be wrong about that though.
>
Your not. A real pending configuration looks like:
Fan A1----\
Fan A2----|---\
>-------PWM1
Fan B1----|---/
Fan B2----/
Fan C1----|------------PWM2
Fan C2----/
Cheers...james
<snip>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (4 preceding siblings ...)
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> > Yeah, LM93... four tachos, two PWM outputs. Odd, but it seems like
> > one anticipated configuration is to drive fans 1-2 (tacho's 1-2)
> > *both* from pwm1. I could be wrong about that though.
> >
> Your not. A real pending configuration looks like:
>
> Fan A1----\
> Fan A2----|---\
> >-------PWM1
> Fan B1----|---/
> Fan B2----/
>
> Fan C1----|------------PWM2
> Fan C2----/
OK, I have to accept Mark's idea then.
Would it make sense to accept both fanN_pwm and pwmN, and use the
approriate entries depending on the chip? It would also mean two
possible names for auto-fan contol files (it87 model), so there would be
three possible sets of names instead of two. This is not good, but OTOH,
using pwmN for SMSC-like chips will probably make the user wonder why
fan1 will stop monitoring when pwm1 is set to 0% duty cycle...
So I guess we better simply revert to pwmN as Mark suggested.
--
Jean "Khali" Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Third auto-fan control interface proposal
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
` (9 preceding siblings ...)
2005-05-19 6:25 ` Greg KH
@ 2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Mark M. Hoffman
11 siblings, 0 replies; 13+ messages in thread
From: Mark M. Hoffman @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
* Jean Delvare <khali@linux-fr.org> [2004-08-12 20:46:31 +0200]:
> > > Yeah, LM93... four tachos, two PWM outputs. Odd, but it seems like
> > > one anticipated configuration is to drive fans 1-2 (tacho's 1-2)
> > > *both* from pwm1. I could be wrong about that though.
> > >
> > Your not. A real pending configuration looks like:
> >
> > Fan A1----\
> > Fan A2----|---\
> > >-------PWM1
> > Fan B1----|---/
> > Fan B2----/
> >
> > Fan C1----|------------PWM2
> > Fan C2----/
>
> OK, I have to accept Mark's idea then.
>
> Would it make sense to accept both fanN_pwm and pwmN, and use the
> approriate entries depending on the chip? It would also mean two
> possible names for auto-fan contol files (it87 model), so there would be
> three possible sets of names instead of two. This is not good, but OTOH,
> using pwmN for SMSC-like chips will probably make the user wonder why
> fan1 will stop monitoring when pwm1 is set to 0% duty cycle...
>
> So I guess we better simply revert to pwmN as Mark suggested.
OK. :) I'll do the patches in a few days, since I brought it up.
Regards,
--
Mark M. Hoffman
mhoffman@lightlink.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-05-19 6:25 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:25 Third auto-fan control interface proposal Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Mark Studebaker
2005-05-19 6:25 ` Mark Studebaker
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` James Olin Oden
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Greg KH
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Mark M. Hoffman
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.