mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-01 06:45:24 +00:00
Drop all the chip-specific handling and printing code from sensors. The
generic printing code should work now, and what doesn't work, will get fixed. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4503 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -35,8 +35,7 @@ SVN HEAD
|
|||||||
Look for rrd in /usr/bin by default
|
Look for rrd in /usr/bin by default
|
||||||
Add missing shell declarations
|
Add missing shell declarations
|
||||||
Update URI
|
Update URI
|
||||||
Program sensors: Drop ddcmon and eeprom support
|
Program sensors: Drop all the chip-specific support
|
||||||
Add dme1737 support
|
|
||||||
Fix alignment of alarm for one-limit temperatures
|
Fix alignment of alarm for one-limit temperatures
|
||||||
Program sensors-detect: Stop Super-I/O probe after first family success
|
Program sensors-detect: Stop Super-I/O probe after first family success
|
||||||
Fix SMSC DME1737 detection
|
Fix SMSC DME1737 detection
|
||||||
|
5912
prog/sensors/chips.c
5912
prog/sensors/chips.c
File diff suppressed because it is too large
Load Diff
@@ -24,60 +24,6 @@
|
|||||||
|
|
||||||
extern void print_unknown_chip(const sensors_chip_name *name);
|
extern void print_unknown_chip(const sensors_chip_name *name);
|
||||||
|
|
||||||
extern void print_asb100(const sensors_chip_name *name);
|
|
||||||
extern void print_ds1621(const sensors_chip_name *name);
|
|
||||||
extern void print_mtp008(const sensors_chip_name *name);
|
|
||||||
extern void print_lm75(const sensors_chip_name *name);
|
|
||||||
extern void print_adm1021(const sensors_chip_name *name);
|
|
||||||
extern void print_adm1024(const sensors_chip_name *name);
|
|
||||||
extern void print_adm1025(const sensors_chip_name *name);
|
|
||||||
extern void print_adm1026(const sensors_chip_name *name);
|
|
||||||
extern void print_adm9240(const sensors_chip_name *name);
|
|
||||||
extern void print_lm78(const sensors_chip_name *name);
|
|
||||||
extern void print_sis5595(const sensors_chip_name *name);
|
|
||||||
extern void print_via686a(const sensors_chip_name *name);
|
|
||||||
extern void print_gl518(const sensors_chip_name *name);
|
|
||||||
extern void print_gl520(const sensors_chip_name *name);
|
|
||||||
extern void print_lm80(const sensors_chip_name *name);
|
|
||||||
extern void print_lm85(const sensors_chip_name *name);
|
|
||||||
extern void print_w83781d(const sensors_chip_name *name);
|
|
||||||
extern void print_w83792d(const sensors_chip_name *name);
|
|
||||||
extern void print_w83793(const sensors_chip_name *name);
|
|
||||||
extern void print_w83l785ts(const sensors_chip_name *name);
|
|
||||||
extern void print_w83627ehf(const sensors_chip_name *name);
|
|
||||||
extern void print_maxilife(const sensors_chip_name *name);
|
|
||||||
extern void print_lm87(const sensors_chip_name *name);
|
|
||||||
extern void print_it87(const sensors_chip_name *name);
|
|
||||||
extern void print_fscpos(const sensors_chip_name *name);
|
|
||||||
extern void print_fscscy(const sensors_chip_name *name);
|
|
||||||
extern void print_fscher(const sensors_chip_name *name);
|
|
||||||
extern void print_pcf8591(const sensors_chip_name *name);
|
|
||||||
extern void print_vt1211(const sensors_chip_name *name);
|
|
||||||
extern void print_smsc47m1(const sensors_chip_name *name);
|
|
||||||
extern void print_smsc47m192(const sensors_chip_name *name);
|
|
||||||
extern void print_pc87360(const sensors_chip_name *name);
|
|
||||||
extern void print_pc87364(const sensors_chip_name *name);
|
|
||||||
extern void print_pc87366(const sensors_chip_name *name);
|
|
||||||
extern void print_pc87427(const sensors_chip_name *name);
|
|
||||||
extern void print_lm92(const sensors_chip_name *name);
|
|
||||||
extern void print_vt8231(const sensors_chip_name *name);
|
|
||||||
extern void print_bmc(const sensors_chip_name *name);
|
|
||||||
extern void print_lm83(const sensors_chip_name *name);
|
|
||||||
extern void print_lm90(const sensors_chip_name *name);
|
|
||||||
extern void print_lm63(const sensors_chip_name *name);
|
|
||||||
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);
|
|
||||||
extern void print_abituguru(const sensors_chip_name *name);
|
|
||||||
extern void print_k8temp(const sensors_chip_name *name);
|
|
||||||
extern void print_coretemp(const sensors_chip_name *name);
|
|
||||||
extern void print_dme1737(const sensors_chip_name *name);
|
|
||||||
|
|
||||||
/* some functions used by chips_generic.c */
|
/* some functions used by chips_generic.c */
|
||||||
#define HYST 0
|
#define HYST 0
|
||||||
#define MINMAX 1
|
#define MINMAX 1
|
||||||
|
@@ -316,122 +316,9 @@ const char *sprintf_chip_name(sensors_chip_name name)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct match {
|
|
||||||
const char * prefix;
|
|
||||||
void (*fn) (const sensors_chip_name *name);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct match matches[] = {
|
|
||||||
/* { "ds1621", print_ds1621 }, */
|
|
||||||
{ "lm75", print_lm75 },
|
|
||||||
{ "adm1021", print_adm1021 },
|
|
||||||
{ "max1617", print_adm1021 },
|
|
||||||
{ "max1617a", print_adm1021 },
|
|
||||||
{ "thmc10", print_adm1021 },
|
|
||||||
{ "lm84", print_adm1021 },
|
|
||||||
{ "gl523", print_adm1021 },
|
|
||||||
{ "adm1023", print_adm1021 },
|
|
||||||
{ "mc1066", print_adm1021 },
|
|
||||||
{ "adm9240", print_adm9240 },
|
|
||||||
{ "ds1780", print_adm9240 },
|
|
||||||
{ "lm81", print_adm9240 },
|
|
||||||
{ "lm78", print_lm78 },
|
|
||||||
{ "lm78-j", print_lm78 },
|
|
||||||
{ "lm79", print_lm78 },
|
|
||||||
{ "mtp008", print_mtp008 },
|
|
||||||
{ "sis5595", print_sis5595 },
|
|
||||||
{ "via686a", print_via686a },
|
|
||||||
{ "lm80", print_lm80 },
|
|
||||||
{ "lm85", print_lm85 },
|
|
||||||
{ "lm85b", print_lm85 },
|
|
||||||
{ "lm85c", print_lm85 },
|
|
||||||
{ "adm1027", print_lm85 },
|
|
||||||
{ "adt7463", print_lm85 },
|
|
||||||
{ "emc6d100", print_lm85 },
|
|
||||||
{ "emc6d102", print_lm85 },
|
|
||||||
{ "lm87", print_lm87 },
|
|
||||||
{ "gl518sm", print_gl518 },
|
|
||||||
{ "gl520sm", print_gl520 },
|
|
||||||
{ "adm1025", print_adm1025 },
|
|
||||||
{ "ne1619", print_adm1025 },
|
|
||||||
{ "adm1024", print_adm1024 },
|
|
||||||
{ "w83781d", print_w83781d },
|
|
||||||
{ "w83782d", print_w83781d },
|
|
||||||
{ "w83783d", print_w83781d },
|
|
||||||
{ "w83627hf", print_w83781d },
|
|
||||||
{ "w83627thf", print_w83781d },
|
|
||||||
{ "w83637hf", print_w83781d },
|
|
||||||
{ "w83697hf", print_w83781d },
|
|
||||||
{ "w83687thf", print_w83781d },
|
|
||||||
{ "w83627ehf", print_w83627ehf },
|
|
||||||
{ "w83627dhg", print_w83627ehf },
|
|
||||||
{ "w83791d", print_w83781d },
|
|
||||||
{ "w83792d", print_w83792d },
|
|
||||||
{ "w83793", print_w83793 },
|
|
||||||
{ "w83l785ts", print_w83l785ts },
|
|
||||||
{ "as99127f", print_w83781d },
|
|
||||||
{ "maxilife", print_maxilife },
|
|
||||||
{ "maxilife-cg", print_maxilife },
|
|
||||||
{ "maxilife-co", print_maxilife },
|
|
||||||
{ "maxilife-as", print_maxilife },
|
|
||||||
{ "maxilife-nba", print_maxilife },
|
|
||||||
{ "it87", print_it87 },
|
|
||||||
{ "it8712", print_it87 },
|
|
||||||
{ "it8716", print_it87 },
|
|
||||||
{ "it8718", print_it87 },
|
|
||||||
{ "fscpos", print_fscpos },
|
|
||||||
{ "fscscy", print_fscscy },
|
|
||||||
{ "fscher", print_fscher },
|
|
||||||
{ "pcf8591", print_pcf8591 },
|
|
||||||
{ "vt1211", print_vt1211 },
|
|
||||||
{ "smsc47m192", print_smsc47m192 },
|
|
||||||
{ "smsc47m1", print_smsc47m1 },
|
|
||||||
{ "smsc47m2", print_smsc47m1 },
|
|
||||||
{ "pc87360", print_pc87360 },
|
|
||||||
{ "pc87363", print_pc87360 },
|
|
||||||
{ "pc87364", print_pc87364 },
|
|
||||||
{ "pc87365", print_pc87366 },
|
|
||||||
{ "pc87366", print_pc87366 },
|
|
||||||
{ "pc87427", print_pc87427 },
|
|
||||||
{ "lm92", print_lm92 },
|
|
||||||
{ "vt8231", print_vt8231 },
|
|
||||||
{ "bmc", print_bmc },
|
|
||||||
{ "adm1026", print_adm1026 },
|
|
||||||
{ "lm83", print_lm83 },
|
|
||||||
/* { "lm90", print_lm90 },
|
|
||||||
{ "adm1032", print_lm90 },
|
|
||||||
{ "lm99", print_lm90 },
|
|
||||||
{ "lm86", print_lm90 },
|
|
||||||
{ "max6657", print_lm90 },
|
|
||||||
{ "adt7461", print_lm90 }, */
|
|
||||||
{ "lm63", print_lm63 },
|
|
||||||
{ "xeontemp", print_xeontemp },
|
|
||||||
{ "max6650", print_max6650 },
|
|
||||||
{ "asb100", print_asb100 },
|
|
||||||
{ "adm1029", print_adm1029 },
|
|
||||||
{ "adm1030", print_adm1031 },
|
|
||||||
{ "adm1031", print_adm1031 },
|
|
||||||
{ "lm93", print_lm93 },
|
|
||||||
{ "smsc47b397", print_smsc47b397 },
|
|
||||||
/* { "f71805f", print_f71805f },
|
|
||||||
{ "f71872f", print_f71805f }, */
|
|
||||||
// { "abituguru", print_abituguru },
|
|
||||||
// { "k8temp", print_k8temp },
|
|
||||||
{ "coretemp", print_coretemp },
|
|
||||||
{ "dme1737", print_dme1737 },
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
void do_a_print(sensors_chip_name name)
|
void do_a_print(sensors_chip_name name)
|
||||||
{
|
{
|
||||||
struct match *m;
|
if (hide_unknown)
|
||||||
|
|
||||||
/* do we know how to display it? */
|
|
||||||
for(m = matches; m->prefix != NULL; m++) {
|
|
||||||
if(!strcmp(name.prefix, m->prefix)) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m->prefix==NULL && hide_unknown)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf("%s\n",sprintf_chip_name(name));
|
printf("%s\n",sprintf_chip_name(name));
|
||||||
@@ -444,13 +331,7 @@ void do_a_print(sensors_chip_name name)
|
|||||||
}
|
}
|
||||||
if (do_unknown)
|
if (do_unknown)
|
||||||
print_unknown_chip(&name);
|
print_unknown_chip(&name);
|
||||||
else if(do_generic)
|
else
|
||||||
print_generic_chip(&name);
|
print_generic_chip(&name);
|
||||||
else {
|
|
||||||
if(m->prefix == NULL)
|
|
||||||
print_generic_chip(&name);
|
|
||||||
else
|
|
||||||
m->fn(&name);
|
|
||||||
}
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user