High, low and crit are in a boat...
Hi all,
I'm on my way to finish the lm90 driver and am facing one more problem. This chipset has, for each temperature sensor, a high limit, a low limit, and a critical limit (plus a common, relative hysteresis value, but that's not the point here). I am wondering in which order I should make them appear in the procfs entries. As far as I could see, the only chipset offering more than two limits per temperature sensor is the lm92. Unfortunately, the order in use here is so bad that I won't use it, for sure. The oder is: current, high, low, crit, hyst. All other drivers have the current value last, and I want to stick to that. I think that the first value should always be high or critical, since these are the values people will want to change the more frequently. Apart from that, I admit I have no strong opinion, so if anyone has, speak up.
Wouldn't it be great to define an order once and for all, so that all drivers behave the same wrt this point?
My proposal would be to place higher values first, down to lower ones, for all values that are absolute. Then the relative values (I'm mostly thinking to chipsets where you can set a relative hysteresis for each sensor, and this value applies to all other limits for that sensor). And finally the current, read-only value.
So in my case this would be: crit, high, low, current.
Comments welcome, as usual.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 10 lines
I would suggest that the critical and hyst values belong in a *seperate* proc entry. The /proc entries for temperature should always and only be:
high, low, current
or
over, hyst, currentas appropriate to the sensor.
Thanks for the suggestion, I just did that. As a side effect, it saved me from another problem (on the LM90, remote temp and remote tcrit have different magnitudes).
Quoted 3 lines
The whole /proc stuff is going away as Greg KH is so fond of repeating and with sysfs, you've only got one value per entry so this whole problem goes away.
Still we have to live with it until the whole universe is using 2.6.
BTW my driver is finished, I now need to update the library and sensors.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
I would suggest that the critical and hyst values belong in a *seperate* proc entry. The /proc entries for temperature should always and only be:
high, low, current
or
over, hyst, current
as appropriate to the sensor.
Also, note that the adm1023 variant of the adm1021 driver adds the temperature offset inbetween low and current and doesn't compensate for that in libsensors, so the adm1023 doesn't print correctly. That wouldn't be a problem if the offset had been placed in a seperate entry.
In the case of the lm85 and adm1026 drivers, I put some related, but exceptional values (temperature offset, critical, etc) in seperate files.
The whole /proc stuff is going away as Greg KH is so fond of repeating and with sysfs, you've only got one value per entry so this whole problem goes away.
:v)
Quoted 29 lines · Jean Delvare
Hi all,
I'm on my way to finish the lm90 driver and am facing one more problem. This chipset has, for each temperature sensor, a high limit, a low limit, and a critical limit (plus a common, relative hysteresis value, but that's not the point here). I am wondering in which order I should make them appear in the procfs entries. As far as I could see, the only chipset offering more than two limits per temperature sensor is the lm92. Unfortunately, the order in use here is so bad that I won't use it, for sure. The oder is: current, high, low, crit, hyst. All other drivers have the current value last, and I want to stick to that. I think that the first value should always be high or critical, since these are the values people will want to change the more frequently. Apart from that, I admit I have no strong opinion, so if anyone has, speak up.
Wouldn't it be great to define an order once and for all, so that all drivers behave the same wrt this point?
My proposal would be to place higher values first, down to lower ones, for all values that are absolute. Then the relative values (I'm mostly thinking to chipsets where you can set a relative hysteresis for each sensor, and this value applies to all other limits for that sensor). And finally the current, read-only value.
So in my case this would be: crit, high, low, current.
Comments welcome, as usual.
Signature · 4 lines
Philip Pokorny, Director of Engineering Tel: 415-358-2635 Fax: 415-358-2646 Toll Free: 888-PENGUIN PENGUIN COMPUTING, INC. www.penguincomputing.com