I'm not the Mark to which Jean refers, but anyway... he is correct.
The sensor chip cannot read temperatures directly, only voltage. The
conversion from degress C to V is dependent on the mainboard for the
reasons Jean mentions.
But also, the chip driver cannot read voltage directly, only bits in a
register. *That* conversion is *not* mainboard dependent; it is
sensor chip specific.
Even when the subject in question is voltage (e.g. power supply +12V),
there is mainboard dependent nonsense between the "real value" and what
is presented at the pin of the sensor chip.
So there is a legitimate need for two conversions. IMHO, the
mainboard dependent one *must* be done in userspace (as Jean says).
But the conversion of raw register values to volts should happen in
the kernel; fixed point maths are sufficient for that.
(Yes I'm simplifying; external sensors can present data to sensors
chips in other electrical formats, e.g. PWM. Same argument applies.)
Regards,
-- Mark M. Hoffman mhoffman@lightlink.com- 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/