This patchset adds support for the new fschmd driver, while keeping

compatibility with the old:
-The feature lists for the fscpos, fscscy and fscher have been extended to
 include the new features exported by the fschmd driver
-Feature lists for the fschmd and fschrc have been added
-The print functions in "sensors" for the fscpos, fscscy and fscher have
 been modified to detect on which driver they run, on the old driver
 behaviour is unmodified, on the new driver the non sysfs-interface
 compliant attributes are not used and the extra features exported by the
 new driver are shown.
-print functions for the fschmd and fschrc have been added to "sensors"
-mapping from the non standard sysfs attr name fan#_ripple used by the old
 fscpos, fscscy and fscher drivers to the standard fan#_div used by the
 fschmd driver has been added to getsysname() using altsysname.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4939 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Hans de Goede committed 2007-10-12 08:16:23 +00:00
1 parent d6962d58e8
commit f062c3fb09
6 files changed
+376 -9

No files matched your search

+11 -3
View File
@@ -272,7 +272,8 @@ static const struct match matches[] = {
Common magnitudes are #defined above.
Common conversions are as follows:
fan%d_min -> fan%d_min (for magnitude)
fan%d_state -> fan%d_status
fan%d_state -> fan%d_status (for old fscxxx drv)
fan%d_ripple -> fan%d_div (for old fscxxx drv, alt. name)
fan%d -> fan%d_input
pwm%d -> fan%d_pwm (alt. name)
pwm%d_enable -> fan%d_pwm_enable (alt. name)
@@ -289,7 +290,7 @@ static const struct match matches[] = {
temp%d_min -> temp%d_min (for magnitude)
temp%d_low -> temp%d_min
temp%d_crit -> temp%d_crit (for magnitude)
temp%d_state -> temp%d_status
temp%d_state -> temp%d_status (for old fscxxx drv)
temp%d_offset -> temp%d_offset (for magnitude)
temp%d -> temp%d_input
sensor%d -> temp%d_type
@@ -346,6 +347,12 @@ static int getsysname(const sensors_chip_feature *feature, char *sysname,
*sysmag = 0;
return 0;
}
if(sscanf(name, "fan%d_rippl%c%c", &num, &last, &check) == 2 && last == 'e') {
strcpy(sysname, name);
sprintf(altsysname, "fan%d_div", num);
*sysmag = 0;
return 0;
}
if(sscanf(name, "fan%d%c", &num, &check) == 1) {
sprintf(sysname, "fan%d_input", num);
*sysmag = FANMAG;
@@ -448,7 +455,8 @@ static int getsysname(const sensors_chip_feature *feature, char *sysname,
/* give up, use old name (probably won't work though...) */
/* known to be the same:
"alarms", "beep_enable", "vrm", "fan%d_div"
"alarms", "beep_enable", "vrm", "fan%d_div" (except old fscxxx drivers
which use fan%d_ripple, fixed using altsysname for new drv. GRR)
*/
strcpy(sysname, name);
*sysmag = feature->scaling;