Add driver for AD7414 i2c temperature
Hi Sean,
Sorry for the late reply, your reply got lost in my mailbox.
Quoted 6 lines · Sean MacLennan
Here is a rework based on Jean Delvare's suggestions.
One change that may not be apparent is that the alert bit is active low. I feel that it reads wrong to have "cat
temp_alert" return 1 when the alert is off. So I invert this bit. Let me know how you feel about this.
I agree with you that 1 should mean "on" in sysfs, regardless of the physical polarity. However, it seems to me that the ALERT polarity can be changed (bit 4 of configuration register) so you shouldn't always invert the bit in sysfs, only when the polarity is actually inverted.
That being said... After reading the datasheet, I am under the impression that temp1_alert and temp1_max_alarm will trigger on the same condition (temp1 > temp1_max). So having both files doesn't look terribly useful to me. Especially when "temp1_alert" is not a standard feature name, so libsensors will no pick it.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors