mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-20 19:41:47 +00:00
Add user-space support for the ADM1029. Patch contributed by
Corentin Labbe. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4270 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
0639e23317
commit
73922b2883
6 files changed
+171
No files matched your search
@@ -13,6 +13,7 @@ SVN HEAD
|
||||
Add f71872f support
|
||||
Add w83627dhg support (David Holl, #2157)
|
||||
Get the i2c adapter names from classdev.name
|
||||
Add adm1029 support (Corentin Labbe)
|
||||
Man page i2cdetect.8: Describe the output convention
|
||||
Man page sensors.1: Update (option -c) and clean up
|
||||
Module i2c-i801: Add ICH9 support
|
||||
@@ -31,6 +32,7 @@ SVN HEAD
|
||||
Drop option -a (show algorithm names)
|
||||
Add f71872f support
|
||||
Add w83627dhg support (David Holl, #2157)
|
||||
Add adm1029 support (Corentin Labbe)
|
||||
Program sensors-detect: Add SMSC DME1737 detection
|
||||
Add Fintek F71882FG and EPoX EP1308 detection
|
||||
Add Intel Core thermal sensor detection
|
||||
|
||||
+66
@@ -362,6 +362,71 @@ static sensors_chip_feature adm1023_features[] =
|
||||
};
|
||||
|
||||
|
||||
static sensors_chip_feature adm1029_features[] =
|
||||
{
|
||||
{ SENSORS_ADM1029_TEMP1, "temp1",
|
||||
NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 3 },
|
||||
{ SENSORS_ADM1029_TEMP1_MAX, "temp1_max",
|
||||
SENSORS_ADM1029_TEMP1,
|
||||
SENSORS_ADM1029_TEMP1,
|
||||
RW, NOSYSCTL, VALUE(1), 3 },
|
||||
{ SENSORS_ADM1029_TEMP1_MIN, "temp1_min",
|
||||
SENSORS_ADM1029_TEMP1,
|
||||
SENSORS_ADM1029_TEMP1,
|
||||
RW, NOSYSCTL, VALUE(2), 3 },
|
||||
|
||||
{ SENSORS_ADM1029_TEMP2, "temp2",
|
||||
NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 3 },
|
||||
{ SENSORS_ADM1029_TEMP2_MAX, "temp2_max",
|
||||
SENSORS_ADM1029_TEMP2,
|
||||
SENSORS_ADM1029_TEMP2,
|
||||
RW, NOSYSCTL, VALUE(1), 3 },
|
||||
{ SENSORS_ADM1029_TEMP2_MIN, "temp2_min",
|
||||
SENSORS_ADM1029_TEMP2,
|
||||
SENSORS_ADM1029_TEMP2,
|
||||
RW, NOSYSCTL, VALUE(2), 3 },
|
||||
|
||||
{ SENSORS_ADM1029_TEMP3, "temp3",
|
||||
NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 3 },
|
||||
{ SENSORS_ADM1029_TEMP3_MAX, "temp3_max",
|
||||
SENSORS_ADM1029_TEMP3,
|
||||
SENSORS_ADM1029_TEMP3,
|
||||
RW, NOSYSCTL, VALUE(1), 3 },
|
||||
{ SENSORS_ADM1029_TEMP3_MIN, "temp3_min",
|
||||
SENSORS_ADM1029_TEMP3,
|
||||
SENSORS_ADM1029_TEMP3,
|
||||
RW, NOSYSCTL, VALUE(2), 3 },
|
||||
|
||||
{ SENSORS_ADM1029_FAN1, "fan1",
|
||||
NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_ADM1029_FAN1_MIN, "fan1_min",
|
||||
SENSORS_ADM1029_FAN1,
|
||||
SENSORS_ADM1029_FAN1,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_ADM1029_FAN1_DIV, "fan1_div",
|
||||
SENSORS_ADM1029_FAN1,
|
||||
NOMAP,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
|
||||
{ SENSORS_ADM1029_FAN2, "fan2",
|
||||
NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_ADM1029_FAN2_MIN, "fan2_min",
|
||||
SENSORS_ADM1029_FAN2,
|
||||
SENSORS_ADM1029_FAN2,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_ADM1029_FAN2_DIV, "fan2_div",
|
||||
SENSORS_ADM1029_FAN2,
|
||||
NOMAP,
|
||||
RW, NOSYSCTL, VALUE(2), 0 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
||||
static sensors_chip_feature adm1030_features[] =
|
||||
{
|
||||
{ SENSORS_ADM1031_TEMP1, "temp1",
|
||||
@@ -6157,6 +6222,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_MAX1619_PREFIX, max1619_features },
|
||||
{ SENSORS_XEONTEMP_PREFIX, xeontemp_features },
|
||||
{ SENSORS_MAX6650_PREFIX, max6650_features },
|
||||
{ SENSORS_ADM1029_PREFIX, adm1029_features },
|
||||
{ SENSORS_ADM1030_PREFIX, adm1030_features },
|
||||
{ SENSORS_ADM1031_PREFIX, adm1031_features },
|
||||
{ SENSORS_LM93_PREFIX, lm93_features },
|
||||
|
||||
+24
@@ -184,6 +184,30 @@
|
||||
#define SENSORS_ADM1021_ALARMS 81 /* R */
|
||||
#define SENSORS_ADM1021_DIE_CODE 90 /* R */
|
||||
|
||||
/* ADM1029 chips */
|
||||
|
||||
#define SENSORS_ADM1029_PREFIX "adm1029"
|
||||
|
||||
#define SENSORS_ADM1029_TEMP1 51
|
||||
#define SENSORS_ADM1029_TEMP1_MAX 52
|
||||
#define SENSORS_ADM1029_TEMP1_MIN 53
|
||||
|
||||
#define SENSORS_ADM1029_TEMP2 61
|
||||
#define SENSORS_ADM1029_TEMP2_MAX 62
|
||||
#define SENSORS_ADM1029_TEMP2_MIN 63
|
||||
|
||||
#define SENSORS_ADM1029_TEMP3 71
|
||||
#define SENSORS_ADM1029_TEMP3_MAX 72
|
||||
#define SENSORS_ADM1029_TEMP3_MIN 73
|
||||
|
||||
#define SENSORS_ADM1029_FAN1 81
|
||||
#define SENSORS_ADM1029_FAN1_MIN 82
|
||||
#define SENSORS_ADM1029_FAN1_DIV 83
|
||||
|
||||
#define SENSORS_ADM1029_FAN2 91
|
||||
#define SENSORS_ADM1029_FAN2_MIN 92
|
||||
#define SENSORS_ADM1029_FAN2_DIV 93
|
||||
|
||||
|
||||
/* ADM1030 and ADM1031 chips */
|
||||
|
||||
|
||||
@@ -5391,6 +5391,83 @@ void print_lm90(const sensors_chip_name *name)
|
||||
free(label);
|
||||
}
|
||||
|
||||
void print_adm1029(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
double cur, high, low, fan_div;
|
||||
int valid;
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP1,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1_MAX, &high)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1_MIN, &low)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, high, low, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get local temperature data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP2,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2_MAX, &high)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2_MIN, &low)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, high, low, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get remote1 temperature data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP3,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3_MAX, &high)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3_MIN, &low)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, high, low, MINMAX, 0, 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get remote2 temperature data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_FAN1,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN1, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN1_MIN, &low)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN1_DIV, &fan_div)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f)\n",
|
||||
cur, low, fan_div);
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get fan1 data!\n");
|
||||
free(label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_FAN2,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN2, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN2_MIN, &low)
|
||||
&& !sensors_get_feature(*name, SENSORS_ADM1029_FAN2_DIV, &fan_div)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f)\n",
|
||||
cur, low , fan_div);
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get fan2 data!\n");
|
||||
free(label);
|
||||
}
|
||||
|
||||
void print_lm63(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
|
||||
@@ -71,6 +71,7 @@ extern void print_lm93(const sensors_chip_name *name);
|
||||
extern void print_max1619(const sensors_chip_name *name);
|
||||
extern void print_xeontemp(const sensors_chip_name *name);
|
||||
extern void print_max6650(const sensors_chip_name *name);
|
||||
extern void print_adm1029(const sensors_chip_name *name);
|
||||
extern void print_adm1031(const sensors_chip_name *name);
|
||||
extern void print_smsc47b397(const sensors_chip_name *name);
|
||||
extern void print_f71805f(const sensors_chip_name *name);
|
||||
|
||||
@@ -412,6 +412,7 @@ struct match matches[] = {
|
||||
{ "xeontemp", print_xeontemp },
|
||||
{ "max6650", print_max6650 },
|
||||
{ "asb100", print_asb100 },
|
||||
{ "adm1029", print_adm1029 },
|
||||
{ "adm1030", print_adm1031 },
|
||||
{ "adm1031", print_adm1031 },
|
||||
{ "lm93", print_lm93 },
|
||||
|
||||
Reference in new issue
Block a user