interface changes in linux 2.6, lm_sensors 2.8.8
Hi all,
The interface change for VID lines (in0_ref -> cpu0_vid) is in linux 2.6.9-rc2. This means that we should make some kind of announcement on our main page (to point 2.6.9-rc2 users to lm_sensors CVS), and prepare to release lm_sensors 2.8.8 before linux 2.6.9 (final) is released.
Mark (Hoffman):
I think you have a plan to revert my bogus pwmN -> fanN_pwm interface change. I believe that it would be great if you could add support for this in libsensors before 2.8.8 is released. That way, people will need to upgrade only once for both changes. Since libsensors now has room for one alternative name for each feature, you don't need to update the drivers themselves now, only the library.
Thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 6 lines
Hello,
I think we need to add "it8712-*" to the sensors.conf.eg, because, again, there is difference between 87xx chip family.
I hope I'm not completly wrong I'm in hurry :)
No, you're correct, this has to be done.
Quoted 4 lines
It was changed in 2.6.9-rc1 with my patch (VRM part 2) that added support for it87 VID lines. I will go to slovakia in few hours, so I cant provide a patch now. Sorry about that. I can do that on monday if really needed.
Well, this can wait a few days, we haven't even set a deadline for 2.8.8 yet. End of the next week maybe? (September 25)
Signature · 2 lines
Jean "Khali" Delvare http://khali.linux-fr.org/
Hello,
I think we need to add "it8712-*" to the sensors.conf.eg, because, again, there is difference between 87xx chip family.
I hope I'm not completly wrong I'm in hurry :)
It was changed in 2.6.9-rc1 with my patch (VRM part 2) that added support for it87 VID lines. I will go to slovakia in few hours, so I cant provide a patch now. Sorry about that. I can do that on monday if really needed.
Thanks
Regards
Rudolf
Hi Mark,
If I remember, it is not because depending on the mode (auto or manual PWM), the same register has a different behaviour. Jean asked to make two sysfs files in order to keep the interface consistant (and chip-independant...)
Alex.
Quoted 15 lines · Mark M. Hoffman
Two other things...
(One) In
adm1031.clines 594-595:Quoted 2 lines
static DEVICE_ATTR(auto_fan##offset##_min_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)But those are also used for the sysfs files fan?_pwm in lines 439-440:
Quoted 2 lines
static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)That's a bug, right?
Hello Jean:
Quoted 6 lines · Jean Delvare
I think you have a plan to revert my bogus pwmN ->
fanN_pwminterface change. I believe that it would be great if you could add support for this in libsensors before 2.8.8 is released. That way, people will need to upgrade only once for both changes. Since libsensors now has room for one alternative name for each feature, you don't need to update the drivers themselves now, only the library.
Agreed, I would like to get the library changes in to 2.8.8. However, I'm not sure yet what is the scope of the changes. Right now, I see these:
fan?_pwm => pwm?
fan?_pwm_enable => pwm?_enable
Are there more? I think there could be. So, that forces me to do the driver work up front anyway.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Hi Jean:
Quoted 8 lines · Mark M. Hoffman
Quoted 6 lines · Jean Delvare
I think you have a plan to revert my bogus pwmN ->
fanN_pwminterface change. I believe that it would be great if you could add support for this in libsensors before 2.8.8 is released. That way, people will need to upgrade only once for both changes. Since libsensors now has room for one alternative name for each feature, you don't need to update the drivers themselves now, only the library.
Quoted 8 lines
Agreed, I would like to get the library changes in to 2.8.8. However, I'm not sure yet what is the scope of the changes. Right now, I see these:
fan?_pwm => pwm?
fan?_pwm_enable => pwm?_enableAre there more? I think there could be. So, that forces me to do the driver work up front anyway.
(all comments here are w.r.t. 2.6.9-rc2)
Well, here are a couple more, from adm1031.c:
auto_fan?_min_pwm => pwm?_auto_min auto_fan?_channel => pwm?_auto_channels
The new names come from your most recent proposal [1], s/fan/pwm/ where necessary.
[1] http://archives.andrew.net.au/lm-sensors/msg08477.html
Two other things...
(One) In adm1031.c lines 594-595:
Quoted 2 lines
static DEVICE_ATTR(auto_fan##offset##_min_pwm, S_IRUGO | S_IWUSR, \
show_pwm_##offset, set_pwm_##offset)But those are also used for the sysfs files fan?_pwm in lines 439-440:
Quoted 2 lines
static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, \
show_pwm_##offset, set_pwm_##offset)That's a bug, right?
(Two) As for fscher.c, I can't honestly tell whether or not it actually supports PWM control. If it does, then the choice of variable and structure names was very poor.
Anyway, the driver patch is almost done. As soon as I understand these last couple things I'll finish it off.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
On Mon, 20 Sep 2004 01:00:22 -0400, Mark M. Hoffman wrote
Quoted 14 lines
Quoted 9 lines
Agreed, I would like to get the library changes in to 2.8.8. However, I'm not sure yet what is the scope of the changes. Right now, I see these:
fan?_pwm => pwm?
fan?_pwm_enable => pwm?_enableAre there more? I think there could be. So, that forces me to do the driver work up front anyway.
(all comments here are w.r.t. 2.6.9-rc2)
Well, here are a couple more, from
adm1031.c:
Quoted 8 lines
auto_fan?_min_pwm => pwm?_auto_min auto_fan?_channel => pwm?_auto_channelsThe new names come from your most recent proposal [1], s/fan/pwm/ where necessary.
[1] http://archives.andrew.net.au/lm-sensors/msg08477.html
I don't think this belong to the same changeset. The pwm and vid changes are reverts from my own changes back in the early 2.6 times. They are documented and were considered stable, and part of libsensors already, which is why we have to provide compatibility.
The auto-fan stuff is new, not official yet (I know it should have been done months ago but I just don't have the time to work on that many things at once
- plus the fact that my previous interface proposals have been everything but successfull, which makes me somewhat reluctant to endorsing this new one) and not part of libsensors. So people using it are (or should be) aware that the interface is subject to change without notice. Since the adm1031 may not comply with the final interface, I don't think it makes sense to change the auto_pwm entries now. Better finalize the interface proposal and publish it, and only then fix all drivers which needs be.
So to me there are only the two changes you mentioned first, which should be quite simple from libsensors' point of view.
Quoted 7 lines
Two other things...
(One) In
adm1031.clines 594-595:Quoted 2 lines
static DEVICE_ATTR(auto_fan##offset##_min_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)
Quoted 6 lines
But those are also used for the sysfs files fan?_pwm in lines 439-440:
Quoted 2 lines
static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)That's a bug, right?
I don't think so. As Alexandre suggests in its reply, the ADM1030 and ADM1031 have registers those meaning change depending of a selected mode. We could not think of a better way than this implementation, which may look a bit confusing first (changing one value will of course change the other as well from the user's point of view, although only one makes sense at any given time). The other possibility would have been to hide the fact that both values were stored in the same register by remembering values in the driver and writing them to the register each time the mode changes. We didn't see any benefit in doing this. I think it is admitted that users should never assume anything about possible links between sysfs values. One example of this is the LM90 and ADM1032 which have a single hysteresis register which applies to two temperature channels, so the two sysfs files map to the same register. In this particular case, I made one of them read-only so as to make it (hopefully) clearer, but using such a trick isn't always possible. For example, it wouldn't work for the ADM1030/ADM1031. And the point is the same, in that writing to one file changes the value of another. Users and user-space applications must expect this to happen depending on the various hardware implementations.
An alternative approach would be to switch sysfs files read-only on mode change, or even to create and destroy them on the fly. I don't know how well it would fit in the current architecture though. And not sure it would look less confusing either.
Quoted 3 lines
(Two) As for
fscher.c, I can't honestly tell whether or not it actually supports PWM control. If it does, then the choice of variable and structure names was very poor.
The FSC Hermes doesn't have PWM capabilities as far as I know. I wonder what made you think it could have.
Thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Hi Alex:
Quoted 4 lines · Alexandre d'Alton
If I remember, it is not because depending on the mode (auto or manual PWM), the same register has a different behaviour. Jean asked to make two sysfs files in order to keep the interface consistant (and chip-independant...)
Aha, OK. Sorry for the noise.
Quoted 10 lines · Mark M. Hoffman
Quoted 9 lines
Two other things...
(One) In
adm1031.clines 594-595:Quoted 2 lines
static DEVICE_ATTR(auto_fan##offset##_min_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)
Quoted 6 lines
Quoted 6 lines
But those are also used for the sysfs files fan?_pwm in lines 439-440:
Quoted 2 lines
static DEVICE_ATTR(fan##offset##_pwm, S_IRUGO | S_IWUSR, \ show_pwm_##offset, set_pwm_##offset)That's a bug, right?
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Hi Jean:
(liberal snips)
Quoted 17 lines · Jean Delvare
On Mon, 20 Sep 2004 01:00:22 -0400, Mark M. Hoffman wrote
Quoted 10 lines
Well, here are a couple more, from
adm1031.c:auto_fan?_min_pwm => pwm?_auto_min auto_fan?_channel => pwm?_auto_channelsThe new names come from your most recent proposal [1], s/fan/pwm/ where necessary.
[1] http://archives.andrew.net.au/lm-sensors/msg08477.htmlI don't think this belong to the same changeset. The pwm and vid changes are reverts from my own changes back in the early 2.6 times. They are documented and were considered stable, and part of libsensors already, which is why we have to provide compatibility.
Quoted 4 lines
(...)
So to me there are only the two changes you mentioned first, which should be quite simple from libsensors' point of view.
Fair enough.
Quoted 11 lines
Quoted 5 lines
(One) In
adm1031.clines 594-595:(...)
That's a bug, right?
I don't think so. As Alexandre suggests in its reply, the ADM1030 and ADM1031 have registers those meaning change depending of a selected mode. We could not think of a better way than this implementation, which may look a bit confusing first (changing one value will of course change the other as well from the (...)
Right, no problem.
Quoted 6 lines
Quoted 3 lines
(Two) As for
fscher.c, I can't honestly tell whether or not it actually supports PWM control. If it does, then the choice of variable and structure names was very poor.The FSC Hermes doesn't have PWM capabilities as far as I know. I wonder what made you think it could have.
Are you sure? Try 'grep pwm kernel/chips/fscher.c' in 2.4/CVS and same in 2.6.9. Actually, the 2.4/CVS and 2.6.9 drivers don't look similar at all.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Quoted 6 lines
Quoted 2 lines
The FSC Hermes doesn't have PWM capabilities as far as I know. I wonder what made you think it could have.
Are you sure? Try 'grep pwm
kernel/chips/fscher.c' in 2.4/CVS and same in 2.6.9. Actually, the 2.4/CVS and 2.6.9 drivers don't look similar at all.
I admit it is strange. It seems to mix the concepts of min and pwm. The SUMMARY and fscher doc files don't mention PWM at all.
Attached is the datasheet for the FSC Hermes if you want to take a look. I'm really too busy these days to go through it, sorry.
Signature · 9 lines
Jean "Khali" Delvare http://khali.linux-fr.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: FSC-Hermes-1.00.pdf Type: application/x-pdf Size: 116859 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/14f33d2e/FSC-Hermes-1.00.bin
Hi Jean:
Quoted 7 lines · Jean Delvare
Quoted 6 lines
Quoted 2 lines
The FSC Hermes doesn't have PWM capabilities as far as I know. I wonder what made you think it could have.
Are you sure? Try 'grep pwm
kernel/chips/fscher.c' in 2.4/CVS and same in 2.6.9. Actually, the 2.4/CVS and 2.6.9 drivers don't look similar at all.
Quoted 5 lines
I admit it is strange. It seems to mix the concepts of min and pwm. The SUMMARY and fscher doc files don't mention PWM at all.
Attached is the datasheet for the FSC Hermes if you want to take a look. I'm really too busy these days to go through it, sorry.
I'm inclined to ignore the fscher not-quite-pwm control for now - as you'll see it's not included in the patch I made. But hey, I don't see how the current libsensors can access those controls with the kernel 2.6 driver anyway; so it's no loss there.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]