lm_sensors v2 asc7621 support
I've had a go at implementing support for George Joseph's experimental Adigilog asc7621 driver in lm_sensors 2.10.5. Find patch attached.
I've been running this for a while with the asc76xx driver on an Intel D975XBX2 board. It works just fine for reading the sensors, although writing the alarm limits and such doesn't seem to work quite right.
Hopefully this might be a starting point for someone else to add official support for these chips to lm_sensors.
Kind regards,
Ken Milmore
lib/chips.c +73 -0
@@ -6384,6 +6384,78 @@ { { 0 }, 0 } }; +#define SENSORS_ASC76XX_IN_FEATURES (nr) \ + { { SENSORS_ASC76XX_IN(nr), "in" #nr, \ + NOMAP, NOMAP, R }, \ + NOSYSCTL, VALUE(1), 3, "in" #nr "_input" }, \ + { { SENSORS_ASC76XX_IN_MIN(nr), "in" #nr "_min", \ + SENSORS_ASC76XX_IN(nr), SENSORS_ASC76XX_IN(nr), RW }, \ + NOSYSCTL, VALUE(1), 3, "in" #nr "_min" }, \ + { { SENSORS_ASC76XX_IN_MAX(nr), "in" #nr "_max", \ + SENSORS_ASC76XX_IN(nr), SENSORS_ASC76XX_IN(nr), RW }, \ + NOSYSCTL, VALUE(1), 3, "in" #nr "_max" }, \ + { { SENSORS_ASC76XX_IN_ALARM(nr), "in" #nr "_alarm", \ + SENSORS_ASC76XX_IN(nr), NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "in" #nr "_alarm" } + +#define SENSORS_ASC76XX_FAN_FEATURES (nr) \ + { { SENSORS_ASC76XX_FAN(nr), "fan" #nr, \ + NOMAP, NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "fan" #nr "_input" }, \ + { { SENSORS_ASC76XX_FAN_MIN(nr), "fan" #nr "_min", \ + SENSORS_ASC76XX_FAN(nr), SENSORS_ASC76XX_FAN(nr), RW }, \ + NOSYSCTL, VALUE(1), 0, "fan" #nr "_min" }, \ + { { SENSORS_ASC76XX_FAN_ALARM(nr), "fan" #nr "_alarm", \ + SENSORS_ASC76XX_FAN(nr), NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "fan" #nr "_alarm" } + +#define SENSORS_ASC76XX_TEMP_FEATURES (nr) \ + { { SENSORS_ASC76XX_TEMP(nr), "temp" #nr, \ + NOMAP, NOMAP, R }, \ + NOSYSCTL, VALUE(1), 3, "temp" #nr "_input" }, \ + { { SENSORS_ASC76XX_TEMP_MAX(nr), "temp" #nr "_max", \ + SENSORS_ASC76XX_TEMP(nr), SENSORS_ASC76XX_TEMP(nr), RW }, \ + NOSYSCTL, VALUE(1), 3, "temp" #nr "_max" }, \ + { { SENSORS_ASC76XX_TEMP_MIN(nr), "temp" #nr "_min", \ + SENSORS_ASC76XX_TEMP(nr), SENSORS_ASC76XX_TEMP(nr), RW }, \ + NOSYSCTL, VALUE(1), 3, "temp" #nr "_min" }, \ + { { SENSORS_ASC76XX_TEMP_ALARM(nr), "temp" #nr "_alarm", \ + SENSORS_ASC76XX_TEMP(nr), NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "temp" #nr "_alarm" }, \ + { { SENSORS_ASC76XX_TEMP_TYPE(nr), "temp" #nr "_type", \ + SENSORS_ASC76XX_TEMP(nr), NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "temp" #nr "_type" } + +#define SENSORS_ASC76XX_CORETEMP_FEATURES (nr) \ + { { SENSORS_ASC76XX_TEMP(nr), "temp" #nr, \ + NOMAP, NOMAP, R }, \ + NOSYSCTL, VALUE(1), 3, "temp" #nr "_input" }, \ + { { SENSORS_ASC76XX_TEMP_TYPE(nr), "temp" #nr "_type", \ + SENSORS_ASC76XX_TEMP(nr), NOMAP, R }, \ + NOSYSCTL, VALUE(1), 0, "temp" #nr "_type" } + +static sensors_chip_feature asc7621_features[] = +{ +SENSORS_ASC76XX_IN_FEATURES (0 ), +SENSORS_ASC76XX_IN_FEATURES (1 ), +SENSORS_ASC76XX_IN_FEATURES (2 ), +SENSORS_ASC76XX_IN_FEATURES (3 ), +SENSORS_ASC76XX_IN_FEATURES (4 ), +SENSORS_ASC76XX_FAN_FEATURES (1 ), +SENSORS_ASC76XX_FAN_FEATURES (2 ), +SENSORS_ASC76XX_FAN_FEATURES (3 ), +SENSORS_ASC76XX_FAN_FEATURES (4 ), +SENSORS_ASC76XX_TEMP_FEATURES (1 ), +SENSORS_ASC76XX_TEMP_FEATURES (2 ), +SENSORS_ASC76XX_TEMP_FEATURES (3 ), +SENSORS_ASC76XX_TEMP_FEATURES (4 ), +SENSORS_ASC76XX_CORETEMP_FEATURES (5 ), +SENSORS_ASC76XX_CORETEMP_FEATURES (6 ), +SENSORS_ASC76XX_CORETEMP_FEATURES (7 ), +SENSORS_ASC76XX_CORETEMP_FEATURES (8 ), + { {0 },0 } +}; +sensors_chip_features sensors_chip_features_list[] = { {SENSORS_LM78_PREFIX , lm78_features },
@@ -6504,5 +6576,6 @@ { SENSORS_F71882FG_PREFIX, f71882fg_features }, { SENSORS_FSCHMD_PREFIX, fschmd_features }, { SENSORS_FSCHRC_PREFIX, fschrc_features }, + { SENSORS_ASC7621_PREFIX, asc7621_features }, { 0 } };
lib/chips.h +21 -0
@@ -2363,4 +2363,25 @@#define SENSORS_FSCHMD_TEMP_ALARM (n) (130 + (n))#define SENSORS_FSCHMD_TEMP_FAULT (n) (140 + (n)) +/* Andigilog aSC76xx family */ +#define SENSORS_ASC7621_PREFIX "asc7621" + +/* in n from 0 to 4 */ +#define SENSORS_ASC76XX_IN (n) (0x01 + (n))/* R */ +#define SENSORS_ASC76XX_IN_MIN (n) (0x11 + (n))/* RW */ +#define SENSORS_ASC76XX_IN_MAX (n) (0x21 + (n))/* RW */ +#define SENSORS_ASC76XX_IN_ALARM (n) (0x31 + (n))/* R */ + +/* fan n from 1 to 4 */ +#define SENSORS_ASC76XX_FAN (n) (0x40 + (n))/* R */ +#define SENSORS_ASC76XX_FAN_MIN (n) (0x50 + (n))/* RW */ +#define SENSORS_ASC76XX_FAN_ALARM (n) (0x60 + (n))/* R */ + +/* temp n from 1 to 8 */ +#define SENSORS_ASC76XX_TEMP (n) (0x70 + (n))/* R */ +#define SENSORS_ASC76XX_TEMP_MAX (n) (0x80 + (n))/* RW */ +#define SENSORS_ASC76XX_TEMP_MIN (n) (0x90 + (n))/* RW */ +#define SENSORS_ASC76XX_TEMP_ALARM (n) (0xa0 + (n))/* R */ +#define SENSORS_ASC76XX_TEMP_TYPE (n) (0xb0 + (n))/* R */ +#endif /* def LIB_SENSORS_CHIPS_H */
prog/sensors/chips.c +93 -0
99 lines not on this page · raw message
prog/sensors/chips.h +1 -0
@@ -85,5 +85,6 @@extern void print_fscpos_fschmd (const sensors_chip_name *name);extern void print_fscscy_fschmd (const sensors_chip_name *name);extern void print_fscher_fschmd (const sensors_chip_name *name); +extern void print_asc7621 (const sensors_chip_name *name);#endif /* def PROG_SENSORS_CHIPS_H */
prog/sensors/main.c +1 -0
@@ -433,6 +433,7 @@ { "adm1022", print_thmc50 }, { "fschmd", print_fschmd }, { "fschrc", print_fschmd }, + { "asc7621", print_asc7621 }, { NULL, NULL } };
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
There's an updated version of the driver at
http://www.peakin.com/x38/asc7621.zip
It's been cleaned up a little and handles both the asc7621 on the Intel D975XBX2 Bad Axe 2 motherboard and the asc7621a which is found on the Intel DX38BT Bonetrail motherboard.
I guess I should get off my butt and submit the driver for review now. :)
george
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ken Milmore
Sent: Saturday, March 01, 2008 12:04 PM
To: [email protected]
Cc: George Joseph
Subject: [lm-sensors] lm_sensors v2 asc7621 support
I've had a go at implementing support for George Joseph's experimental Adigilog asc7621 driver in lm_sensors 2.10.5. Find patch attached.
I've been running this for a while with the asc76xx driver on an Intel D975XBX2 board. It works just fine for reading the sensors, although writing the alarm limits and such doesn't seem to work quite right.
Hopefully this might be a starting point for someone else to add official support for these chips to lm_sensors.
Kind regards,
Ken Milmore
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · George Joseph (dev)
There's an updated version of the driver at
http://www.peakin.com/x38/asc7621.zipIt's been cleaned up a little and handles both the asc7621 on the Intel D975XBX2 Bad Axe 2 motherboard and the asc7621a which is found on the Intel DX38BT Bonetrail motherboard.
I guess I should get off my butt and submit the driver for review now. :)
Yes please.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Ken,
Quoted 9 lines · Ken Milmore
I've had a go at implementing support for George Joseph's experimental Adigilog asc7621 driver in
lm_sensors2.10.5. Find patch attached.I've been running this for a while with the asc76xx driver on an Intel D975XBX2 board. It works just fine for reading the sensors, although writing the alarm limits and such doesn't seem to work quite right.
Hopefully this might be a starting point for someone else to add official support for these chips to
lm_sensors.
For new drivers, we don't really want to add support to lm-sensors 2.10.x. Just use lm-sensors 3.0.x, which supports all hwmon drivers by design.
Thanks,
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors