mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-02 13:30:30 +00:00
Better thmc50/adm1022 support. Original patch by Krzysztof Helt.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4799 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
203aea1f51
commit
5cbb6046a4
6 files changed
+70
No files matched your search
@@ -13,6 +13,7 @@ SVN HEAD
|
||||
Fix adm1026 critical temperature limits for Linux 2.6
|
||||
Fix smsc47m192 temperature faults
|
||||
Add sch311x support
|
||||
Add support for adm1022 temp3
|
||||
Makefile: Fix kernel version detection (#2187)
|
||||
Module fscher: Add missing read of control register (2.6 backport)
|
||||
Module i2c-piix4: Add ATI SB700 and SB800 support (2.6 backport)
|
||||
@@ -20,6 +21,7 @@ SVN HEAD
|
||||
Program sensors: Fix a memory leak on error (with -u)
|
||||
Add sch311x support
|
||||
Hide error on missing dme1737 fan and pwm
|
||||
Add thmc50/adm1022 support
|
||||
Program sensors-detect: Don't probe i2c-isa as a regular i2c bus
|
||||
Add Winbond W83L786NR/NG/R/G detection
|
||||
Add Winbond W83L771W/G detection
|
||||
|
||||
+13
@@ -2756,6 +2756,19 @@ static sensors_chip_feature thmc50_features[] =
|
||||
SENSORS_THMC50_REMOTE_TEMP, RW },
|
||||
THMC50_SYSCTL_REMOTE_TEMP, VALUE(1),
|
||||
0 },
|
||||
{ { SENSORS_ADM1022_REMOTE_TEMP2, "remote_temp2", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(3),
|
||||
0, "temp3_input", 3 },
|
||||
{ { SENSORS_ADM1022_REMOTE_TEMP2_HYST, "remote_temp2_hyst",
|
||||
SENSORS_ADM1022_REMOTE_TEMP2,
|
||||
SENSORS_ADM1022_REMOTE_TEMP2, RW },
|
||||
NOSYSCTL, VALUE(2),
|
||||
0, "temp3_min", 3 },
|
||||
{ { SENSORS_ADM1022_REMOTE_TEMP2_OVER, "remote2_temp_over",
|
||||
SENSORS_ADM1022_REMOTE_TEMP2,
|
||||
SENSORS_ADM1022_REMOTE_TEMP2, RW },
|
||||
NOSYSCTL, VALUE(1),
|
||||
0, "temp3_max", 3 },
|
||||
{ { SENSORS_THMC50_ANALOG_OUT, "analog output", NOMAP, NOMAP, RW },
|
||||
THMC50_SYSCTL_ANALOG_OUT, VALUE(1), 0,
|
||||
"pwm1", 0 },
|
||||
|
||||
@@ -1191,6 +1191,9 @@
|
||||
#define SENSORS_THMC50_REMOTE_TEMP 54 /* R */
|
||||
#define SENSORS_THMC50_REMOTE_TEMP_HYST 55 /* RW */
|
||||
#define SENSORS_THMC50_REMOTE_TEMP_OVER 56 /* RW */
|
||||
#define SENSORS_ADM1022_REMOTE_TEMP2 57 /* R */
|
||||
#define SENSORS_ADM1022_REMOTE_TEMP2_HYST 58 /* RW */
|
||||
#define SENSORS_ADM1022_REMOTE_TEMP2_OVER 59 /* RW */
|
||||
#define SENSORS_THMC50_ANALOG_OUT 71 /* RW */
|
||||
#define SENSORS_THMC50_INTER 81 /* R */
|
||||
#define SENSORS_THMC50_INTER_MASK 82 /* RW */
|
||||
|
||||
@@ -6251,6 +6251,55 @@ void print_f71882fg(const sensors_chip_name *name)
|
||||
print_f71882fg_temp(name, i);
|
||||
}
|
||||
|
||||
void print_thmc50(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
double cur, hyst, over;
|
||||
int valid;
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_THMC50_TEMP,
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_TEMP, &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_TEMP_HYST, &hyst) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_TEMP_OVER, &over)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, over, hyst, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get temperature1 data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_THMC50_REMOTE_TEMP,
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_REMOTE_TEMP, &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_REMOTE_TEMP_HYST, &hyst) &&
|
||||
!sensors_get_feature(*name, SENSORS_THMC50_REMOTE_TEMP_OVER, &over)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, over, hyst, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get temperature2 data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1022_REMOTE_TEMP2,
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_ADM1022_REMOTE_TEMP2, &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_ADM1022_REMOTE_TEMP2_HYST, &hyst) &&
|
||||
!sensors_get_feature(*name, SENSORS_ADM1022_REMOTE_TEMP2_OVER, &over)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, over, hyst, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
/* No error if files are missing as it will happen for original thmc50 */
|
||||
free(label);
|
||||
}
|
||||
|
||||
void print_unknown_chip(const sensors_chip_name *name)
|
||||
{
|
||||
int a,b,valid;
|
||||
|
||||
@@ -80,5 +80,6 @@ extern void print_coretemp(const sensors_chip_name *name);
|
||||
extern void print_dme1737(const sensors_chip_name *name);
|
||||
extern void print_applesmc(const sensors_chip_name *name);
|
||||
extern void print_f71882fg(const sensors_chip_name *name);
|
||||
extern void print_thmc50(const sensors_chip_name *name);
|
||||
|
||||
#endif /* def PROG_SENSORS_CHIPS_H */
|
||||
@@ -427,6 +427,8 @@ static struct match matches[] = {
|
||||
{ "sch311x", print_dme1737 },
|
||||
{ "applesmc", print_applesmc },
|
||||
{ "f71882fg", print_f71882fg },
|
||||
{ "thmc50", print_thmc50 },
|
||||
{ "adm1022", print_thmc50 },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user