hwmon: (lm90) Enhancements for ADT7461
cover hwmon: (lm90) Enhancements for ADT7461
These changes enable extended mode operation for the ADT7461 which will allow temperature readings from -64..191 degC instead of the current limited range of 0..127 degC. I decided to split up the changes so that the first patch doesn't affect functionality, but just makes preparations needed to make the second patch easier to follow.
- Nate Case <[email protected]>
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Nate,
Quoted 5 lines · Nate Case
These changes enable extended mode operation for the ADT7461 which will allow temperature readings from -64..191 degC instead of the current limited range of 0..127 degC. I decided to split up the changes so that the first patch doesn't affect functionality, but just makes preparations needed to make the second patch easier to follow.
Thanks for splitting the changes that way, it will make reviewing them much easier. I'll do that over the week-end, stay tuned.
Could you possibly provide a dump of an ADT7461 chip in extended mode? You can obtain it with i2cdump (part of the i2c-tools package). This will help me test your changes.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 4 lines · Jean Delvare
Could you possibly provide a dump of an ADT7461 chip in extended mode? You can obtain it with i2cdump (part of the i2c-tools package). This will help me test your changes.
Sure. See below:
$ LOCAL_TEMP=/sys/class/hwmon/hwmon1/device/temp1_input
$ REMOTE_TEMP=/sys/class/hwmon/hwmon1/device/temp2_input
$ i2cdump -f 0 0x4c b ; cat $LOCAL_TEMP ; cat $REMOTE_TEMP
WARNING! This program can confuse your I2C bus, cause data loss and
worse!
I will probe file /dev/i2c-0, address 0x4c, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 67 75 53 04 05 55 00 55 00 04 05 55 00 55 00 00 guS??U.U.??U.U..
10: 00 00 00 00 00 80 80 00 00 55 00 00 00 00 00 00 .....??..U......
20: 55 0a 01 00 00 00 00 00 00 c3 00 00 00 00 00 00 U??......?......
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 51 ..............AQ
39000
52750Signature · 7 lines
Nate Case <[email protected]> _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Nate,
Quoted 22 lines · Nate Case
Quoted 4 lines · Jean Delvare
Could you possibly provide a dump of an ADT7461 chip in extended mode? You can obtain it with i2cdump (part of the i2c-tools package). This will help me test your changes.
Sure. See below:
(...)$ i2cdump -f 0 0x4c b (...) WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x4c, mode byte Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 67 75 53 04 05 55 00 55 00 04 05 55 00 55 00 00 guS??U.U.??U.U.. 10: 00 00 00 00 00 80 80 00 00 55 00 00 00 00 00 00 .....??..U...... 20: 55 0a 01 00 00 00 00 00 00 c3 00 00 00 00 00 00 U??......?...... 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Quoted 8 lines
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 51 ..............AQ
Thank you, I've added this one to my collection. This made me notice that sensors-detect had a bug and wouldn't identify this chip properly. It's fixed now.
As expected the current lm90 driver doesn't recognize this chip because it's in extended resolution mode.
I'll review your patches this afternoon. Note that I already have 4 patches pending for the lm90 driver, so I might need to adjust your patches so that they apply properly on top. In that case, I'll repost a clean, complete patch set once we are done with the review and testing.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors