Skip to contentSkip to conversation

Help needed for implementing&testing Fintek F75375

lm-sensors Christian Emmerich 3 participants 15 messages Jun 12, 2007 – Jul 10, 2007 Library code

lore
Share & tools
lore
#0 lore raw

Hello

First of all, thanks to all for developing such a useful tool.

Now to my problem, I'm using an AOpen XC Cube (ex18), sensors-detect shows that a have to use the module f75375s, i install it using the driver developed by Riku Voipio, posted may 22. Using w83627hf don't show any fan-speed or temperature, voltage seems to be ok.

I try to integrate the driver in lm-sensors, but now i'm confused how to get lm-sensors (svn- version) working with this chip. Could someone give me a hint. Maybe somone else is testing it too and could send me his version of lm-sensors or could publish his configuration/files.

It would also be helpfull if somone only gives an example of an driver which is similar to f75375s.

Is it correct that i have to update lib/chips.c, lib/chips.h and prog/sensors/chip.h, prog/sensors/chip.c and prog/sensors/main.c? What functions are needed and so on.

The module is recognized by 'sensors-detect' but i'm not able to get an output running 'sensors', because the needed functions, structs and defines are mostly not correct.

many thanks
christian.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Hi Chistian,

Quoted 11 lines · Christian Emmerich

Now to my problem, I'm using an AOpen XC Cube (ex18), sensors-detect shows that a have to use the module f75375s, i install it using the driver developed by Riku Voipio, posted may 22.
Using w83627hf don't show any fan-speed or temperature, voltage seems to be ok.

I try to integrate the driver in lm-sensors, but now i'm confused how to get lm-sensors (svn- version) working with this chip. Could someone give me a hint. Maybe somone else is testing it too and could send me his version of lm-sensors or could publish his configuration/files.

Quoted 6 lines

It would also be helpfull if somone only gives an example of an driver which is similar to f75375s.

Is it correct that i have to update lib/chips.c, lib/chips.h and prog/sensors/chip.h, prog/sensors/chip.c and prog/sensors/main.c? What functions are needed and so on.

Yes, this is correct.

Quoted 3 lines

The module is recognized by 'sensors-detect' but i'm not able to get an output running 'sensors', because the needed functions, structs and defines are mostly not correct.

I suggest that you take a look at a patch doing the same for another driver:

http://www.lm-sensors.org/changeset/4355

This patch was adding user-space support for the dme1737 driver. You need to do something very similar, except for sensors-detect which you probably don't need to change.

If you have specific questions on the way, feel free to ask, but all in all, copy and paste and a bit of trial and error should work fine.

Please submit your patch when you're done, so that we can apply it and everybody benefits.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Christian Emmerich

Hello Jean,

Quoted 12 lines
Quoted 3 lines

The module is recognized by 'sensors-detect' but i'm not able to get an output running 'sensors', because the needed functions, structs and defines are mostly not correct.

I suggest that you take a look at a patch doing the same for another driver:

http://www.lm-sensors.org/changeset/4355

This patch was adding user-space support for the dme1737 driver. You need to do something very similar, except for sensors-detect which you probably don't need to change.

Quoted 8 lines

If you have specific questions on the way, feel free to ask, but all in all, copy and paste and a bit of trial and error should work fine.

Please submit your patch when you're done, so that we can apply it and everybody benefits.

Signature · 1 line
Jean Delvare

Thank you for your answer. I take a look at the changeset for the dme1737 driver, it seems that this is the example i was looking for.

I will try to start 'copying and pasting' this afternoon, if it work i will submit it.

christian.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Christian Emmerich

Hi

I have tried to commit the changes i made for
Fintek F75373S support, but it failed.
( bash shows:

root@pc:/usr/src# svn commit command
Anmeldebereich: <http://lm-sensors.org:80> lm-sensors/i2c
Passwort fuer 'root':
and so on )
Is a Username/Password required for a svn commit 
/ who can create a login for me?

christian.

---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#4 lore raw
In reply to Christian Emmerich

Hi Christian,

Quoted 8 lines · Christian Emmerich

I have tried to commit the changes i made for
Fintek F75373S support, but it failed.
( bash shows:

root@pc:/usr/src# svn commit command
Anmeldebereich: <http://lm-sensors.org:80> lm-sensors/i2c
Passwort fuer 'root':
and so on )
Is a Username/Password required for a svn commit 

Of course. Have you ever seen one open source project where anonymous CVS/SVN writes are allowed?

Quoted 1 line

/ who can create a login for me?

This isn't how things work, sorry. Please submit your patch to this mailing list and we'll review it first, then we'll apply it for you when it's ready.

Only if you become a regular contributor to the lm-sensors project, we'll take the time to create an account for you.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#5 lore raw
In reply to Christian Emmerich

Hi Jean

Quoted 2 lines

Of course. Have you ever seen one open source project where anonymous CVS/SVN writes are allowed?

It's my first patch for an open source project, at work i have a login and at home it is not neccessary, so i was a little bit confused.

Quoted 3 lines

This isn't how things work, sorry. Please submit your patch to this mailing list and we'll review it first, then we'll apply it for you when it's ready.

OK, later at home i will use diff to create a patch-file with all changes and send this attached to my mail to the mailing-list.

Thanks for your help,
christian.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#6 lore raw
In reply to Christian Emmerich

Hi

I've attached a patch for Fintek F75373S support,
kernel module f75375s is required.

At the moment it is possible to read out 4 different voltage values, 2 temperatures and 2 fans/pwm (i've only one fan connected, so i could only verify that one of two is working correct).
I was not able to adjust fan speed using fancontrol, i have to do it by hand.

sensors output looks like:

mythtv@pc:~$ sensors F75373-*
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
VCC:       +1.72 V  (min =  +0.00 V, max =  +0.00 V)  
V1:        +1.34 V  (min =  +0.00 V, max =  +0.00 V)  
V2:        +1.01 V  (min =  +0.00 V, max =  +0.00 V)  
V3:        +0.77 V  (min =  +0.00 V, max =  +0.00 V)  
CPU Temp:    +50°C  (high =    +0°C, hyst =    +0°C)  
Sys Temp:    +47°C  (high =    +0°C, hyst =    +0°C)  
CPU Fan:  1866 RPM  (min =    0 RPM)
CPU PWM:    31      (enable = 1)

christian.

---------------------------------
Yahoo! Messenger - kostenlos* mit Familie und Freunden von PC zu PC telefonieren.

etc/sensors.conf.eg +33 -0
diff -urN lm-sensors_org/etc/sensors.conf.eg lm-sensors/etc/sensors.conf.eg
@@ -2880,3 +2880,36 @@
 #   set fan4_min 1000
 #   set fan5_min 1000
 #   set fan6_min 1000
+
+
+#
+# Sample configuration for the Fintek F75373
+#
+chip "f75373-*"
+
+# Voltages
+   label in0_input "VCC"
+   label in1_input "V1"
+   label in2_input "V2"
+   label in3_input "V3"
+
+   compute in0_input  @/1000,@/1000
+   compute in1_input  @/1000,@/1000
+   compute in2_input  @/1000,@/1000
+   compute in3_input  @/1000,@/1000
+
+# Fans
+   label fan1 "CPU Fan"
+   label fan2 "Sys Fan"
+
+   compute fan1  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@
+   compute fan2  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@
+
+# Temperatures
+   label temp1 "CPU Temp"
+   label temp2 "Sys Temp"
+   
+# PWM
+   label pwm1   "CPU PWM"
+   label pwm2   "Sys PWM"
+
lib/chips.c +59 -0

70 lines not on this page · raw message

lib/chips.h +24 -0
diff -urN lm-sensors_org/lib/chips.h lm-sensors/lib/chips.h
@@ -2312,4 +2312,28 @@
 #define SENSORS_APPLESMC_FAN_MAX(n)		(0x61 + (n)) /* R */
 #define SENSORS_APPLESMC_FAN_SAFE(n)		(0x81 + (n)) /* R */
 
+/* Fintek F75373 registers  */
+
+#define SENSORS_F75373_PREFIX "f75373"
+
+// voltage n from 0 to 3
+#define SENSORS_F75373_IN(nr)           (0x10 + (nr))
+#define SENSORS_F75373_IN_MAX(nr)       (0x20 + (nr) * 2 )
+#define SENSORS_F75373_IN_MIN(nr)       (0x21 + (nr) * 2 )
+
+// temp n from 0 to 1
+#define SENSORS_F75373_TEMP(nr)         (0x14 + (nr))
+#define SENSORS_F75373_TEMP_MAX(nr)     (0x28 + (nr) * 2 )
+#define SENSORS_F75373_TEMP_HYST(nr)    (0x29 + (nr) * 2 )
+
+// fan n from 0 to 1
+#define SENSORS_F75373_FAN(nr)          (0x16 + (nr) * 2 )
+#define SENSORS_F75373_FAN_MIN(nr)      (0x26 + (nr) * 2 )
+// FAN Full Speed Count Register Index 70h
+#define SENSORS_F75373_FAN_MAX(nr)      (0x70 + (nr) * 0x10 )
+
+// pwm n from 0 to 1
+#define SENSORS_F75373_PWM(nr)          (0x76 + (nr) * 0x10 )
+#define SENSORS_F75373_PWM_ENABLE(nr)   (0x7D + (nr) * 0x10 )
+
 #endif /* def LIB_SENSORS_CHIPS_H */
prog/sensors/chips.c +108 -0

114 lines not on this page · raw message

prog/sensors/chips.h +1 -0
diff -urN lm-sensors_org/prog/sensors/chips.h lm-sensors/prog/sensors/chips.h
@@ -78,5 +78,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_f75373(const sensors_chip_name *name);
 
 #endif /* def PROG_SENSORS_CHIPS_H */
prog/sensors/main.c +1 -0
diff -urN lm-sensors_org/prog/sensors/main.c lm-sensors/prog/sensors/main.c
@@ -424,6 +424,7 @@
  	{ "coretemp", print_coretemp },
  	{ "dme1737", print_dme1737 },
 	{ "applesmc", print_applesmc },
+	{ "F75373", print_f75373 },
 	{ NULL, NULL }
 };
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#7 lore raw
In reply to Christian Emmerich

Hi Christian,

Quoted 7 lines · Christian Emmerich

I've attached a patch for Fintek F75373S support, kernel module f75375s is required.

At the moment it is possible to read out 4 different voltage values, 2 temperatures and 2 fans/pwm (i've only one fan connected, so i could only verify that one of two is working correct).

OK, my review is below.

Quoted 2 lines

I was not able to adjust fan speed using fancontrol, i have to do it by hand.

Did pwmconfig work?

Quoted 12 lines

sensors output looks like:

mythtv@pc:~$ sensors F75373-*
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
VCC:       +1.72 V  (min =  +0.00 V, max =  +0.00 V)  
V1:        +1.34 V  (min =  +0.00 V, max =  +0.00 V)  
V2:        +1.01 V  (min =  +0.00 V, max =  +0.00 V)  
V3:        +0.77 V  (min =  +0.00 V, max =  +0.00 V)  
CPU Temp:    +50°C  (high =    +0°C, hyst =    +0°C)  
Sys Temp:    +47°C  (high =    +0°C, hyst =    +0°C)  
CPU Fan:  1866 RPM  (min =    0 RPM)
CPU PWM:    31      (enable = 1)

Did you try setting limits?

Quoted 14 lines

diff -urN lm-sensors_org/etc/sensors.conf.eg lm-sensors/etc/sensors.conf.eg

etc/sensors.conf.eg +7 -0
@@ -2880,3 +2880,36 @@
 #   set fan4_min 1000
 #   set fan5_min 1000
 #   set fan6_min 1000
+
+
+#
+# Sample configuration for the Fintek F75373
+#
+chip "f75373-*"
+

etc/sensors.conf.eg line 2899

Quoted 10 lines
etc/sensors.conf.eg +10 -0
+# Voltages
+   label in0_input "VCC"
+   label in1_input "V1"
+   label in2_input "V2"
+   label in3_input "V3"
+
+   compute in0_input  @/1000,@/1000
+   compute in1_input  @/1000,@/1000
+   compute in2_input  @/1000,@/1000
+   compute in3_input  @/1000,@/1000

That's not correct, you should have "in0", "in1"... etc. here, not "in0_input", "in1_input" etc? The fan and temperature symbols below are correct.

Also, these compute lines don't make sense. The second formula is supposed to be the reserve of the first formula, that's not the case here.

Lastly, you really shouldn't have to divide the values by 1000. This suggests that the magnitude wasn't set properly in libsensors (it should be 3, I suggest it is 0). This issue is most probably related to the incorrect symbol names.

etc/sensors.conf.eg line 2906

Quoted 7 lines
etc/sensors.conf.eg +7 -0
+
+# Fans
+   label fan1 "CPU Fan"
+   label fan2 "Sys Fan"
+
+   compute fan1  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@
+   compute fan2  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

Quoted 13 lines
etc/sensors.conf.eg +9 -0
+
+# Temperatures
+   label temp1 "CPU Temp"
+   label temp2 "Sys Temp"
+   
+# PWM
+   label pwm1   "CPU PWM"
+   label pwm2   "Sys PWM"
+

diff -urN lm-sensors_org/lib/chips.c lm-sensors/lib/chips.c

lib/chips.c line 6116

Quoted 9 lines
lib/chips.c +6 -0
@@ -6108,6 +6108,64 @@
     { { 0 }, 0 }
   };
 
+
+
+#define SENSORS_F75373_IN_FEATURES(nr) \
+        { { SENSORS_F75373_IN(nr), "in" #nr "_input", \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(3), 3 }, \

OK, the problem is here: This should be"in" #nr, not "in" #nr "_input". This will fix your magnitude problem.

lib/chips.c line 6119

Quoted 3 lines
lib/chips.c +3 -0
+        { { SENSORS_F75373_IN_MIN(nr), "in" #nr "_min", \
+                SENSORS_F75373_IN(nr), SENSORS_F75373_IN(nr), RW }, \
+                NOSYSCTL, VALUE(2), 3 }, \

VALUE(1) (although it won't make a difference for a Linux 2.6 only driver.

Quoted 4 lines
lib/chips.c +4 -0
+        { { SENSORS_F75373_IN_MAX(nr), "in" #nr "_max", \
+                SENSORS_F75373_IN(nr), SENSORS_F75373_IN(nr), RW }, \
+                NOSYSCTL, VALUE(2), 3 }
+

lib/chips.c line 6133

Quoted 10 lines
lib/chips.c +10 -0
+#define SENSORS_F75373_TEMP_FEATURES(nr) \
+        { { SENSORS_F75373_TEMP(nr), "temp" #nr "", \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(3), 3 }, \
+        { { SENSORS_F75373_TEMP_MAX(nr), "temp" #nr "_max", \
+                SENSORS_F75373_TEMP(nr), SENSORS_F75373_TEMP(nr), RW }, \
+                NOSYSCTL, VALUE(1), 3 }, \
+        { { SENSORS_F75373_TEMP_HYST(nr), "temp" #nr "_hyst", \
+                SENSORS_F75373_TEMP(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }

SENSORS_F75373_TEMP(nr) instead of NOMAP, VALUE(2) instead of VALUE(1), and magnitude 3 instead of 0. Is it really read-only?

(Unless this isn't an hysteresis temperature at all - see below.)

lib/chips.c line 6141

Quoted 8 lines
lib/chips.c +8 -0
+
+#define SENSORS_F75373_FAN_FEATURES(nr) \
+        { { SENSORS_F75373_FAN(nr), "fan" #nr, \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(2), 0 }, \
+        { { SENSORS_F75373_FAN_MAX(nr), "fan" #nr "_max", \
+                SENSORS_F75373_FAN(nr), SENSORS_F75373_FAN(nr), RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \

Strange, I've never seen a fan speed sensor with a high limit. What does it correspond to exactly? Why don't you display this value in "sensors"?

lib/chips.c line 6144

Quoted 3 lines
lib/chips.c +3 -0
+        { { SENSORS_F75373_FAN_MIN(nr), "fan" #nr "_min", \
+                SENSORS_F75373_FAN(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }

SENSORS_F75373_FAN(nr) instead of NOMAP.

Is it really read-only?

lib/chips.c line 6152

Quoted 8 lines
lib/chips.c +8 -0
+
+#define SENSORS_F75373_PWM_FEATURES(nr) \
+        { { SENSORS_F75373_PWM(nr), "pwm" #nr, \
+                NOMAP, NOMAP, RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \
+        { { SENSORS_F75373_PWM_ENABLE(nr), "pwm" #nr "_enable", \
+                SENSORS_F75373_PWM(nr), SENSORS_F75373_PWM(nr), RW }, \
+                NOSYSCTL, VALUE(3), 0 }

In fact we don't include PWM stuff in libsensors. They are not sensors, and are better handled using pwmconfig and fancontrol.

Quoted 28 lines
lib/chips.c +16 -0
+
+static sensors_chip_feature f75373_features[] > +{
+        SENSORS_F75373_IN_FEATURES(0),
+        SENSORS_F75373_IN_FEATURES(1),
+        SENSORS_F75373_IN_FEATURES(2),
+        SENSORS_F75373_IN_FEATURES(3),
+        SENSORS_F75373_TEMP_FEATURES(1),
+        SENSORS_F75373_TEMP_FEATURES(2),
+        SENSORS_F75373_FAN_FEATURES(1),
+        SENSORS_F75373_FAN_FEATURES(2),
+        SENSORS_F75373_PWM_FEATURES(1),
+        SENSORS_F75373_PWM_FEATURES(2),
+        { { 0 }, 0 }
+};
+
 sensors_chip_features sensors_chip_features_list[] >  {
  { SENSORS_LM78_PREFIX, lm78_features },
@@ -6223,5 +6281,6 @@
  { SENSORS_CORETEMP_PREFIX, coretemp_features },
  { SENSORS_DME1737_PREFIX, dme1737_features },
  { SENSORS_APPLESMC_PREFIX, applesmc_features },
+ { SENSORS_F75373_PREFIX, f75373_features },
  { 0 }
 };

diff -urN lm-sensors_org/lib/chips.h lm-sensors/lib/chips.h

lib/chips.h line 2319

Quoted 8 lines
lib/chips.h +5 -0
@@ -2312,4 +2312,28 @@
 #define SENSORS_APPLESMC_FAN_MAX(n)		(0x61 + (n)) /* R */
 #define SENSORS_APPLESMC_FAN_SAFE(n)		(0x81 + (n)) /* R */
 
+/* Fintek F75373 registers  */
+
+#define SENSORS_F75373_PREFIX "f75373"
+
+// voltage n from 0 to 3

No C++-style comments please. Use /* */.

lib/chips.h line 2322

Quoted 3 lines
lib/chips.h +3 -0
+#define SENSORS_F75373_IN(nr)           (0x10 + (nr))
+#define SENSORS_F75373_IN_MAX(nr)       (0x20 + (nr) * 2 )
+#define SENSORS_F75373_IN_MIN(nr)       (0x21 + (nr) * 2 )

Coding style: no space before closing parenthesis.

Quoted 6 lines
lib/chips.h +6 -0
+
+// temp n from 0 to 1
+#define SENSORS_F75373_TEMP(nr)         (0x14 + (nr))
+#define SENSORS_F75373_TEMP_MAX(nr)     (0x28 + (nr) * 2 )
+#define SENSORS_F75373_TEMP_HYST(nr)    (0x29 + (nr) * 2 )
+

lib/chips.h line 2338

Quoted 10 lines
lib/chips.h +10 -0
+// fan n from 0 to 1
+#define SENSORS_F75373_FAN(nr)          (0x16 + (nr) * 2 )
+#define SENSORS_F75373_FAN_MIN(nr)      (0x26 + (nr) * 2 )
+// FAN Full Speed Count Register Index 70h
+#define SENSORS_F75373_FAN_MAX(nr)      (0x70 + (nr) * 0x10 )
+
+// pwm n from 0 to 1
+#define SENSORS_F75373_PWM(nr)          (0x76 + (nr) * 0x10 )
+#define SENSORS_F75373_PWM_ENABLE(nr)   (0x7D + (nr) * 0x10 )
+

I hope that you realize that these numbers do NOT have to match the register numbers in the chip? These numbers are completely arbitrary. So please make them as simple as possible.

Quoted 13 lines
lib/chips.h +0 -0
 #endif /* def LIB_SENSORS_CHIPS_H */

diff -urN lm-sensors_org/prog/sensors/chips.c lm-sensors/prog/sensors/chips.c

prog/sensors/chips.c +5 -0
@@ -6131,6 +6131,114 @@
 	}
 }
 
+static void print_f75373_in(const sensors_chip_name *name, int i)
+{
+  char *label;
+  double cur, min, max;
+  int valid;

prog/sensors/chips.c line 6148

Quoted 10 lines
prog/sensors/chips.c +10 -0
+
+  if (!sensors_get_label_and_valid(*name, SENSORS_F75373_IN(i), &label,
+                                  &valid) &&
+      !sensors_get_feature(*name, SENSORS_F75373_IN(i), &cur) &&
+      !sensors_get_feature(*name, SENSORS_F75373_IN_MAX(i), &max) &&
+      !sensors_get_feature(*name, SENSORS_F75373_IN_MIN(i), &min)) {
+    if (valid) {
+      print_label(label, 10);
+      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)  \n",
+             cur, min, max);

If you don't have any alarm flag to display, you can remove the spaces before the newline.

Quoted 9 lines
prog/sensors/chips.c +9 -0
+    }
+  } else {
+    printf("ERROR: Can't get in%d data!\n", i);
+  }
+  free(label);
+}
+
+static void print_f75373_temp(const sensors_chip_name *name, int i)
+{

prog/sensors/chips.c line 6167

Quoted 10 lines
prog/sensors/chips.c +10 -0
+  char *label;
+  double cur, max, alarm;
+  int valid;
+
+  if (!sensors_get_label_and_valid(*name, SENSORS_F75373_TEMP(i), &label,
+                                   &valid) &&
+      !sensors_get_feature(*name, SENSORS_F75373_TEMP(i), &cur) &&
+      !sensors_get_feature(*name, SENSORS_F75373_TEMP_MAX(i), &max) &&
+      !sensors_get_feature(*name, SENSORS_F75373_TEMP_HYST(i), &alarm)
+      ) {

Coding style: move this at the end of the previous line.

prog/sensors/chips.c line 6172

Quoted 5 lines
prog/sensors/chips.c +5 -0
+    if (valid) {
+      print_label(label, 10);
+      print_temp_info(cur, max, 0, HYST , 0, 0);
+      printf("%s\n", alarm ? "ALARM" : "");
+    }

This doesn't make sense. What is SENSORS_F75373_TEMP_HYST exactly? Why do you display it as an alarm?

Quoted 7 lines
prog/sensors/chips.c +7 -0
+  } else {
+    printf("ERROR: Can't get temp%d data!\n", i);
+  }
+  free(label);
+}
+
+static void print_f75373_fan(const sensors_chip_name *name, int i)

prog/sensors/chips.c line 6189

Quoted 10 lines
prog/sensors/chips.c +10 -0
+{
+  char *label;
+  double cur, min;
+  int valid;
+
+  if (!sensors_get_label_and_valid(*name, SENSORS_F75373_FAN(i), &label,
+                                   &valid) &&
+      !sensors_get_feature(*name, SENSORS_F75373_FAN(i), &cur) &&
+      !sensors_get_feature(*name, SENSORS_F75373_FAN_MIN(i), &min)
+     ){

Coding style: move this at the end of the previous line.

Quoted 30 lines
prog/sensors/chips.c +30 -0
+    if (valid) {
+      print_label(label, 10);
+      printf("%4.0f RPM  (min = %4.0f RPM)\n", 
+             cur, min);
+    }
+  } else {
+    printf("ERROR: Can't get fan%d data!\n", i);
+  }
+  free(label);
+}
+
+static void print_f75373_pwm(const sensors_chip_name *name, int i)
+{
+  char *label;
+  double cur, enable;
+  int valid;
+
+  if (!sensors_get_label_and_valid(*name, SENSORS_F75373_PWM(i), &label,
+                                   &valid) &&
+      !sensors_get_feature(*name, SENSORS_F75373_PWM(i), &cur) &&
+      !sensors_get_feature(*name, SENSORS_F75373_PWM_ENABLE(i), &enable)) {
+    if (valid) {
+      print_label(label, 10);
+      printf("%4.0f      (enable = %1.0f)\n", cur, enable);
+    }
+  } else {
+    printf("ERROR: Can't get pwm%d data!\n", i);
+  }
+  free(label);
+}

prog/sensors/chips.c line 6229

Quoted 10 lines
prog/sensors/chips.c +10 -0
+
+void print_f75373(const sensors_chip_name *name)
+{
+  int i;
+
+  for (i = 0; i < 4; i++) {
+    print_f75373_in(name, i);
+  }
+
+  for (i = 1; i < 3; i++) {

I'd suggest writing it i <= 2, to make it more visible that there are 2 temperature inputs, not 3. Same below for fans.

Quoted 29 lines
prog/sensors/chips.c +12 -0
+    print_f75373_temp(name, i);
+  }
+
+  for (i = 1; i < 3; i++) {
+    print_f75373_fan(name, i);
+  }
+
+  for (i = 1; i < 3; i++) {
+    print_f75373_pwm(name, i);
+  }
+}
+
 void print_unknown_chip(const sensors_chip_name *name)
 {
   int a,b,valid;

diff -urN lm-sensors_org/prog/sensors/chips.h lm-sensors/prog/sensors/chips.h

prog/sensors/chips.h +1 -0
@@ -78,5 +78,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_f75373(const sensors_chip_name *name);
 
 #endif /* def PROG_SENSORS_CHIPS_H */

diff -urN lm-sensors_org/prog/sensors/main.c lm-sensors/prog/sensors/main.c

prog/sensors/main.c line 427

Quoted 4 lines
prog/sensors/main.c +1 -0
@@ -424,6 +424,7 @@
  	{ "coretemp", print_coretemp },
  	{ "dme1737", print_dme1737 },
 	{ "applesmc", print_applesmc },
+	{ "F75373", print_f75373 },

Should be "f75373", no capital. I'm even surprised it worked with the capital.

prog/sensors/main.c line 430

Quoted 3 lines
prog/sensors/main.c +0 -0
 	{ NULL, NULL }
 };
 

Please update your patch and resend it.

Also, what about the F75375 support? As far as I know the f75375s driver supports both chips, so it'd be nice to have user-space support for both. Also, it might be less confusing to use F75375 for all the libsensors defines, rather than F75373, so that they match the driver name.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#8 lore raw
In reply to Christian Emmerich

Hi Jean,

The first version of this message was to large and was rejected, so i had to cut the quote a little bit.

Quoted 1 line

Did pwmconfig work?

I get it working now, i just have to set FCTEMPS and FCFANS correct in /etc/fancontrol now it work. The only problem is, that if i stop fancontrol, the program set pwm1_enable to 0, but after this the fan turns at 23rpm. This also happens if i set pwm1_enable to 0 by hand.

Quoted 8 lines

sensors output looks like:

mythtv@pc:~$ sensors F75373-*
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
:
CPU PWM:    31      (enable = 1)

Did you try setting limits?

I try to set limits in sensors.conf but i could see no change.

Quoted 4 lines

That's not correct, you should have "in0", "in1"... etc. here, not "in0_input", "in1_input" etc? The fan and temperature symbols below are correct.

Quoted 8 lines

Also, these compute lines don't make sense. The second formula is supposed to be the reserve of the first formula, that's not the case here.

Lastly, you really shouldn't have to divide the values by 1000. This suggests that the magnitude wasn't set properly in libsensors (it should be 3, I suggest it is 0). This issue is most probably related to the incorrect symbol names.

I saw values >800V so i thought i have to divide it by 1000 in sensors.conf.
Magnitude is 3 and the symbol name is correct now, but the values are still over 800V. What's the reason?

Quoted 2 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page ( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm.
So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Quoted 7 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+#define SENSORS_F75373_IN_FEATURES(nr) \
+        { { SENSORS_F75373_IN(nr), "in" #nr "_input", \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(3), 3 }, \

OK, the problem is here: This should be"in" #nr, not "in" #nr "_input". This will fix your magnitude problem.

I changed it to "in" #nr, \

Review

Quoted 2 lines
(quoted diff) +2 -0
+        { { SENSORS_F75373_IN_MIN(nr), "in" #nr "_min", \
+                SENSORS_F75373_IN(nr), SENSORS_F75373_IN(nr), RW },

\

Quoted 4 lines

+ NOSYSCTL, VALUE(2), 3 }, \

VALUE(1) (although it won't make a difference for a Linux 2.6 only driver.

VALUE(2) changed to VALUE(1)

Quoted 8 lines
(quoted diff) +2 -0
+        { { SENSORS_F75373_IN_MAX(nr), "in" #nr "_max", \
+                SENSORS_F75373_IN(nr), SENSORS_F75373_IN(nr), RW },

:

(quoted diff) +4 -0
+                NOSYSCTL, VALUE(1), 3 }, \
+        { { SENSORS_F75373_TEMP_HYST(nr), "temp" #nr "_hyst", \
+                SENSORS_F75373_TEMP(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }
Quoted 4 lines

SENSORS_F75373_TEMP(nr) instead of NOMAP, VALUE(2) instead of VALUE(1), and magnitude 3 instead of 0. Is it really read-only?

(Unless this isn't an hysteresis temperature at all - see below.)

I changed it. It is not only read-only, i changed it to RW.

Review

Quoted 7 lines
(quoted diff) +7 -0
+
+#define SENSORS_F75373_FAN_FEATURES(nr) \
+        { { SENSORS_F75373_FAN(nr), "fan" #nr, \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(2), 0 }, \
+        { { SENSORS_F75373_FAN_MAX(nr), "fan" #nr "_max", \
+                SENSORS_F75373_FAN(nr), SENSORS_F75373_FAN(nr), RW

}, \

Quoted 5 lines

+ NOSYSCTL, VALUE(1), 0 }, \

Strange, I've never seen a fan speed sensor with a high limit. What does it correspond to exactly? Why don't you display this value in "sensors"?

I get the information out of the documentation on page 26:
"When power on, the PWMOUT1 will output full duty cycle (FFh) to enable system FAN. After 10 seconds when detecting FANIN1 signal, assuming the fan has been fully turned on, the fan speed count detected will be recorded in the register.". Dunno if it should be removed?

Quoted 7 lines
(quoted diff) +3 -0
+        { { SENSORS_F75373_FAN_MIN(nr), "fan" #nr "_min", \
+                SENSORS_F75373_FAN(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }

SENSORS_F75373_FAN(nr) instead of NOMAP.

Is it really read-only?

I changed it to SENSORS_F75373_FAN(nr), it is RW.
But fanX_min is allways zero, so it lead to an error on calling 'sensors_get_feature(*name, SENSORS_F75373_FAN_MIN(i), &min)', i have to disable it, sensors output is now
CPU Fan: 1866 RPM (min = 0 RPM)
to
CPU Fan: 1866 RPM

Review

Quoted 7 lines
(quoted diff) +7 -0
+
+#define SENSORS_F75373_PWM_FEATURES(nr) \
+        { { SENSORS_F75373_PWM(nr), "pwm" #nr, \
+                NOMAP, NOMAP, RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \
+        { { SENSORS_F75373_PWM_ENABLE(nr), "pwm" #nr "_enable", \
+                SENSORS_F75373_PWM(nr), SENSORS_F75373_PWM(nr), RW

}, \

Quoted 4 lines

+ NOSYSCTL, VALUE(3), 0 }

In fact we don't include PWM stuff in libsensors. They are not sensors, and are better handled using pwmconfig and fancontrol.

I only copied it from SENSORS_DME1737_PWM_FEATURES, should i remove it?

Quoted 8 lines
(quoted diff) +2 -0
+
+static sensors_chip_feature f75373_features[] =

:

(quoted diff) +3 -0
+#define SENSORS_F75373_PREFIX "f75373"
+
+// voltage n from 0 to 3

No C++-style comments please. Use /* */.

I used now /**/.

Quoted 5 lines
(quoted diff) +3 -0
+#define SENSORS_F75373_IN(nr)           (0x10 + (nr))
+#define SENSORS_F75373_IN_MAX(nr)       (0x20 + (nr) * 2 )
+#define SENSORS_F75373_IN_MIN(nr)       (0x21 + (nr) * 2 )

Coding style: no space before closing parenthesis.

I changed it.

Quoted 10 lines
(quoted diff) +3 -0
+
+// temp n from 0 to 1
+#define SENSORS_F75373_TEMP(nr)         (0x14 + (nr))

:

(quoted diff) +2 -0
+#define SENSORS_F75373_PWM_ENABLE(nr)   (0x7D + (nr) * 0x10 )
+

I hope that you realize that these numbers do NOT have to match the register numbers in the chip? These numbers are completely arbitrary. So please make them as simple as possible.

No :-), i changed it.

Quoted 2 lines

#endif /* def LIB_SENSORS_CHIPS_H */
diff -urN lm-sensors_org/prog/sensors/chips.c

lm-sensors/prog/sensors/chips.c

Quoted 1 line

--- lm-sensors_org/prog/sensors/chips.c 2007-06-17 15:34:33.000000000

+0200

Quoted 1 line

+++ lm-sensors/prog/sensors/chips.c 2007-06-17 16:29:50.000000000

+0200

Quoted 11 lines
(quoted diff) +1 -0
@@ -6131,6 +6131,114 @@
     }
 }
 
+static void print_f75373_in(const sensors_chip_name *name, int i)

:

(quoted diff) +2 -0
+      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)  \n",
+             cur, min, max);

If you don't have any alarm flag to display, you can remove the spaces before the newline.

I changed it.

Quoted 5 lines
(quoted diff) +3 -0
+    }
+  } else {
+    printf("ERROR: Can't get in%d data!\n", i);

:
+ !sensors_get_feature(*name, SENSORS_F75373_TEMP_HYST(i),

&alarm)

Quoted 3 lines

+ ) {

Coding style: move this at the end of the previous line.

I changed it.

Quoted 8 lines
(quoted diff) +5 -0
+    if (valid) {
+      print_label(label, 10);
+      print_temp_info(cur, max, 0, HYST , 0, 0);
+      printf("%s\n", alarm ? "ALARM" : "");
+    }

This doesn't make sense. What is SENSORS_F75373_TEMP_HYST exactly? Why do you display it as an alarm?

It was a mistake, i deleted the Alarm output, now it is only printf("\n"), there seems not to be a value for an alarm.
temp1_max_hyst is always zero, i don't now what it is exactly and when it is not zero.

Quoted 9 lines
(quoted diff) +2 -0
+  } else {
+    printf("ERROR: Can't get temp%d data!\n", i);

:

(quoted diff) +4 -0
+                                   &valid) &&
+      !sensors_get_feature(*name, SENSORS_F75373_FAN(i), &cur) &&
+      !sensors_get_feature(*name, SENSORS_F75373_FAN_MIN(i), &min)
+     ){

Coding style: move this at the end of the previous line.

I changed it.

Quoted 13 lines
(quoted diff) +4 -0
+    if (valid) {
+      print_label(label, 10);
+      printf("%4.0f RPM  (min = %4.0f RPM)\n",
+             cur, min);

:

(quoted diff) +7 -0
+  int i;
+
+  for (i = 0; i < 4; i++) {
+    print_f75373_in(name, i);
+  }
+
+  for (i = 1; i < 3; i++) {
Quoted 2 lines

I'd suggest writing it i <= 2, to make it more visible that there are 2 temperature inputs, not 3. Same below for fans.

I changed it.

Quoted 10 lines
(quoted diff) +3 -0
+    print_f75373_temp(name, i);
+  }
+

:

(quoted diff) +1 -0
@@ -424,6 +424,7 @@
      { "coretemp", print_coretemp },
      { "dme1737", print_dme1737 },
     { "applesmc", print_applesmc },
+    { "F75373", print_f75373 },
 
Quoted 2 lines

Should be "f75373", no capital. I'm even surprised it worked with the capital.

If i use f75373 i get following output:
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
VCC: 1720.00 (in0)
in0_min: 0.00 (in0_min)
in0_max: 0.00 (in0_max)
V1: 1336.00 (in1)
in1_min: 0.00 (in1_min)
in1_max: 0.00 (in1_max)
V2: 1008.00 (in2)
in2_min: 0.00 (in2_min)
in2_max: 0.00 (in2_max)
V3: 792.00 (in3)
in3_min: 0.00 (in3_min)
in3_max: 0.00 (in3_max)
CPU Temp: 49.00 (temp1)
temp1_max: 0.00 (temp1_max)
temp1_hyst: 0.00 (temp1_hyst)
Sys Temp: 46.00 (temp2)
temp2_max: 0.00 (temp2_max)
temp2_hyst: 0.00 (temp2_hyst)
CPU Fan: 1787.84 (fan1)
fan1_max: 5681.82 (fan1_max)
ERROR: Can't get feature `fan1_min' data! CPU PWM: 31.00 (pwm1)
What's the reason? Did I still have to use "F75373"?

Quoted 8 lines

Please update your patch and resend it.

Also, what about the F75375 support? As far as I know the f75375s
driver
supports both chips, so it'd be nice to have user-space support for both. Also, it might be less confusing to use F75375 for all the libsensors defines, rather than F75373, so that they match the driver name.

I changed every define/function from F75373 to F75375, i added also:
#define SENSORS_F75373_PREFIX "f75373"
#define SENSORS_F75375_PREFIX "f75375"
and
{ SENSORS_F75375_PREFIX, f75375_features },
{ SENSORS_F75373_PREFIX, f75375_features },
and
{ "F75375", print_f75375 },
{ "F75373", print_f75375 },
i hope that this is ok.

Quoted 4 lines

Thanks,
--
Jean Delvare

Thank you for your review,
christian.

---------------------------------
Was ist Glück? Schlafen Fische überhaupt? Die Antworten gibt’s auf Yahoo! Clever.

etc/sensors.conf.eg +28 -0
diff -urN lm-sensors_org/etc/sensors.conf.eg lm-sensors/etc/sensors.conf.eg
@@ -2880,3 +2880,31 @@
 #   set fan4_min 1000
 #   set fan5_min 1000
 #   set fan6_min 1000
+
+
+#
+# Sample configuration for the Fintek F75375/F75373S
+#
+chip "F75375-*" "F75373-*"
+
+# Voltages
+   label in0 "VCC"
+   label in1 "V1"
+   label in2 "V2"
+   label in3 "V3"
+    
+# Fans
+   label fan1 "CPU Fan"
+   label fan2 "Sys Fan"
+
+   compute fan1  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@
+   compute fan2  ( 1.5 * 1000000 )/@,  ( 1.5 * 1000000 )/@
+
+# Temperatures
+   label temp1 "CPU Temp"
+   label temp2 "Sys Temp"
+   
+# PWM
+   label pwm1   "CPU PWM"
+   label pwm2   "Sys PWM"
+
lib/chips.c +60 -0

71 lines not on this page · raw message

lib/chips.h +25 -0
diff -urN lm-sensors_org/lib/chips.h lm-sensors/lib/chips.h
@@ -2312,4 +2312,29 @@
 #define SENSORS_APPLESMC_FAN_MAX(n)		(0x61 + (n)) /* R */
 #define SENSORS_APPLESMC_FAN_SAFE(n)		(0x81 + (n)) /* R */
 
+/* Fintek F75373 registers  */
+
+#define SENSORS_F75373_PREFIX "f75373"
+#define SENSORS_F75375_PREFIX "f75375"
+
+/* voltage n from 1 to 4 */
+#define SENSORS_F75375_IN(nr)           (0x01 + (nr))
+#define SENSORS_F75375_IN_MAX(nr)       (0x11 + (nr) * 2)
+#define SENSORS_F75375_IN_MIN(nr)       (0x21 + (nr) * 2)
+
+/* temp n from 1 to 2 */
+#define SENSORS_F75375_TEMP(nr)         (0x31 + (nr))
+#define SENSORS_F75375_TEMP_MAX(nr)     (0x41 + (nr) * 2)
+#define SENSORS_F75375_TEMP_HYST(nr)    (0x51 + (nr) * 2)
+
+/* fan n from 1 to 2 */
+#define SENSORS_F75375_FAN(nr)          (0x61 + (nr) * 2)
+#define SENSORS_F75375_FAN_MIN(nr)      (0x71 + (nr) * 2)
+/* FAN Full Speed Count Register Index 70h */
+#define SENSORS_F75375_FAN_MAX(nr)      (0x81 + (nr) * 0x10)
+
+/* pwm n from 1 to 2 */
+#define SENSORS_F75375_PWM(nr)          (0xa1 + (nr) * 0x10)
+#define SENSORS_F75375_PWM_ENABLE(nr)   (0xc1 + (nr) * 0x10)
+
 #endif /* def LIB_SENSORS_CHIPS_H */
prog/sensors/chips.c +106 -0

112 lines not on this page · raw message

prog/sensors/chips.h +1 -0
diff -urN lm-sensors_org/prog/sensors/chips.h lm-sensors/prog/sensors/chips.h
@@ -78,5 +78,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_f75375(const sensors_chip_name *name);
 
 #endif /* def PROG_SENSORS_CHIPS_H */
prog/sensors/main.c +2 -0
diff -urN lm-sensors_org/prog/sensors/main.c lm-sensors/prog/sensors/main.c
@@ -424,6 +424,8 @@
  	{ "coretemp", print_coretemp },
  	{ "dme1737", print_dme1737 },
 	{ "applesmc", print_applesmc },
+        { "F75375", print_f75375 },
+        { "F75373", print_f75375 },
 	{ NULL, NULL }
 };
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#9 lore raw
In reply to Christian Emmerich

Hi Christian,

Quoted 2 lines · Christian Emmerich

The first version of this message was to large and was rejected, so i had to cut the quote a little bit.

The reject message explained that you shouldn't be sending HTML mails. This makes your mails more than twice as big as they should, and that explains the reject.

Quoted 5 lines
Quoted 1 line

Did pwmconfig work?

I get it working now, i just have to set FCTEMPS and FCFANS correct in /etc/fancontrol now it work. The only problem is, that if i stop fancontrol, the program set pwm1_enable to 0, but after this the fan turns at 23rpm. This also happens if i set pwm1_enable to 0 by hand.

Sounds like a bug in the driver then. Setting pwm1_enable to 0 should turn the fan to full speed.

Quoted 9 lines
Quoted 8 lines

sensors output looks like:

mythtv@pc:~$ sensors F75373-*
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
:
CPU PWM:    31      (enable = 1)

Did you try setting limits?

I try to set limits in sensors.conf but i could see no change.

You must run "sensors -s" after changing the limits
in /etc/sensors.conf for the new limits to be applied. Please test this, this is a good way to test both the libsensors code you added, and the driver itself.

Quoted 8 lines
Quoted 4 lines

Lastly, you really shouldn't have to divide the values by 1000. This suggests that the magnitude wasn't set properly in libsensors (it should be 3, I suggest it is 0). This issue is most probably related to the incorrect symbol names.

I saw values >800V so i thought i have to divide it by 1000 in sensors.conf. Magnitude is 3 and the symbol name is correct now, but the values are still over 800V. What's the reason?

I guess that's a bug in the driver. What values do you see in the in*_input sysfs files?

Quoted 10 lines
Quoted 2 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page ( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm.
So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Almost all chips do that, but that's not the point. Our sysfs-interface standard says that the conversion to RPM must occur in the driver and not in user-space. So the f75375 driver needs to be updated.

Quoted 12 lines
Quoted 11 lines
(quoted diff) +7 -0
+#define SENSORS_F75373_FAN_FEATURES(nr) \
+        { { SENSORS_F75373_FAN(nr), "fan" #nr, \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(2), 0 }, \
+        { { SENSORS_F75373_FAN_MAX(nr), "fan" #nr "_max", \
+                SENSORS_F75373_FAN(nr), SENSORS_F75373_FAN(nr), RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \

Strange, I've never seen a fan speed sensor with a high limit. What does it correspond to exactly? Why don't you display this value in "sensors"?

Quoted 6 lines

I get the information out of the documentation on page 26:
"When power on, the PWMOUT1 will output full duty cycle (FFh) to enable system FAN. After 10 seconds when detecting FANIN1 signal, assuming the fan has been fully turned on, the fan speed count detected will be recorded in the register.". Dunno if it should be removed?

Oh, I see, it is recording the maximum possible speed. It should be marked read-only then, I guess. I am also reluctant to naming this feature fan1_max, even if we don't use that name yet, because the _max suffix is only used for limits at the moment so it might be confusing to use _max for something else now. Maybe fan1_full? This should be discussed separately. In the meantime, I suggest that you omit this value in libsensors.

Quoted 8 lines
Quoted 7 lines
(quoted diff) +3 -0
+        { { SENSORS_F75373_FAN_MIN(nr), "fan" #nr "_min", \
+                SENSORS_F75373_FAN(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }

SENSORS_F75373_FAN(nr) instead of NOMAP.

Is it really read-only?

Quoted 7 lines

I changed it to SENSORS_F75373_FAN(nr), it is RW.
But fanX_min is allways zero, so it lead to an error on calling 'sensors_get_feature(*name, SENSORS_F75373_FAN_MIN(i), &min)', i have to disable it, sensors output is now
CPU Fan: 1866 RPM (min = 0 RPM)
to
CPU Fan: 1866 RPM

fan1_min = 0 isn't an error per se. If you see an error, then something else must be wrong. Can you read the value from fan1_min directly from sysfs?

Quoted 8 lines
Quoted 8 lines
(quoted diff) +7 -0
+#define SENSORS_F75373_PWM_FEATURES(nr) \
+        { { SENSORS_F75373_PWM(nr), "pwm" #nr, \
+                NOMAP, NOMAP, RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \
+        { { SENSORS_F75373_PWM_ENABLE(nr), "pwm" #nr "_enable", \
+                SENSORS_F75373_PWM(nr), SENSORS_F75373_PWM(nr), RW }, \
+                NOSYSCTL, VALUE(3), 0 }
Quoted 4 lines
Quoted 2 lines

In fact we don't include PWM stuff in libsensors. They are not sensors, and are better handled using pwmconfig and fancontrol.

I only copied it from SENSORS_DME1737_PWM_FEATURES, should i remove it?

Ah, I hadn't noticed that the DME1737 had definitions for PWM. It's more of an exception than the rule. So yes, please remove the PWM stuff.

Quoted 6 lines
Quoted 6 lines
(quoted diff) +5 -0
+    if (valid) {
+      print_label(label, 10);
+      print_temp_info(cur, max, 0, HYST , 0, 0);
+      printf("%s\n", alarm ? "ALARM" : "");
+    }
Quoted 7 lines
Quoted 2 lines

This doesn't make sense. What is SENSORS_F75373_TEMP_HYST exactly? Why do you display it as an alarm?

It was a mistake, i deleted the Alarm output, now it is only printf("\n"), there seems not to be a value for an alarm.
temp1_max_hyst is always zero, i don't now what it is exactly and when it is not zero.

temp1_max_hyst is supposed to represent the hysteresis temperature value for the temp1_max limit, and the value should be passed as the 3rd argument to print_temp_info(). If it reads 0, maybe that's a driver bug. Again, try reading the value directly from sysfs. And please report the problems you find to the driver author so that he can fix them.

Quoted 26 lines
Quoted 7 lines

{ "coretemp", print_coretemp },
{ "dme1737", print_dme1737 },
{ "applesmc", print_applesmc },
+ { "F75373", print_f75373 },

Should be "f75373", no capital. I'm even surprised it worked with the capital.

If i use f75373 i get following output:
F75373-i2c-1-2d
Adapter: SMBus nForce2 adapter at 5100
VCC: 1720.00 (in0)
in0_min: 0.00 (in0_min)
in0_max: 0.00 (in0_max)
V1: 1336.00 (in1)
in1_min: 0.00 (in1_min)
in1_max: 0.00 (in1_max)
V2: 1008.00 (in2)
in2_min: 0.00 (in2_min)
in2_max: 0.00 (in2_max)
V3: 792.00 (in3)
in3_min: 0.00 (in3_min)
in3_max: 0.00 (in3_max)
CPU Temp: 49.00 (temp1)
temp1_max: 0.00 (temp1_max)
temp1_hyst: 0.00 (temp1_hyst)

Quoted 8 lines

Sys Temp: 46.00 (temp2)
temp2_max: 0.00 (temp2_max)
temp2_hyst: 0.00 (temp2_hyst)
CPU Fan: 1787.84 (fan1)
fan1_max: 5681.82 (fan1_max)
ERROR: Can't get feature `fan1_min' data! CPU PWM: 31.00 (pwm1)
What's the reason? Did I still have to use "F75373"?

I see. This suggests that the driver itself identifies the chip as F75373, and that's not correct. You need to put "f75373" in sensors, and the driver needs to be updated in the same way.

Quoted 7 lines
Quoted 6 lines

Also, what about the F75375 support? As far as I know the f75375s
driver
supports both chips, so it'd be nice to have user-space support for both. Also, it might be less confusing to use F75375 for all the libsensors defines, rather than F75373, so that they match the driver name.

Quoted 9 lines

I changed every define/function from F75373 to F75375, i added also:
#define SENSORS_F75373_PREFIX "f75373"
#define SENSORS_F75375_PREFIX "f75375"
and
{ SENSORS_F75375_PREFIX, f75375_features },
{ SENSORS_F75373_PREFIX, f75375_features },
and
{ "F75375", print_f75375 },
{ "F75373", print_f75375 },

Except for the leading capital, yes, it's OK. That being said, what's the difference between the F75373 and the F75375? If the F75375 has less inputs, then you'll need to adjust the code in "sensors" to not try to display the missing inputs.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#10 lore raw
In reply to Christian Emmerich
Quoted 10 lines · Jean Delvare
Quoted 6 lines
Quoted 2 lines

Did pwmconfig work?

I get it working now, i just have to set FCTEMPS and FCFANS correct in /etc/fancontrol now it work. The only problem is, that if i stop fancontrol, the program set pwm1_enable to 0, but after this the fan turns at 23rpm. This also happens if i set pwm1_enable to 0 by hand.

Sounds like a bug in the driver then. Setting pwm1_enable to 0 should turn the fan to full speed.

The sysfs interface states that pwm_enable to 0 turns off pwm control... How would that turn fans to full speed?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Lastly, you really shouldn't have to divide the values by 1000. This suggests that the magnitude wasn't set properly in libsensors (it should be 3, I suggest it is 0). This issue is most probably related to the incorrect symbol names.

Quoted 9 lines
Quoted 4 lines

I saw values >800V so i thought i have to divide it by 1000 in sensors.conf. Magnitude is 3 and the symbol name is correct now, but the values are still over 800V. What's the reason?

I guess that's a bug in the driver. What values do you see in the in*_input sysfs files?

Fixed.

Quoted 12 lines
Quoted 11 lines
Quoted 3 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page ( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm.
So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Quoted 4 lines

Almost all chips do that, but that's not the point. Our sysfs-interface standard says that the conversion to RPM must occur in the driver and not in user-space. So the f75375 driver needs to be updated.

Will be fixed..

Quoted 20 lines
Quoted 12 lines
Quoted 8 lines
(quoted diff) +7 -0
+#define SENSORS_F75373_FAN_FEATURES(nr) \
+        { { SENSORS_F75373_FAN(nr), "fan" #nr, \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(2), 0 }, \
+        { { SENSORS_F75373_FAN_MAX(nr), "fan" #nr "_max", \
+                SENSORS_F75373_FAN(nr), SENSORS_F75373_FAN(nr), RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \
Quoted 4 lines

Strange, I've never seen a fan speed sensor with a high limit. What does it correspond to exactly? Why don't you display this value in "sensors"?

Quoted 7 lines

I get the information out of the documentation on page 26:
"When power on, the PWMOUT1 will output full duty cycle (FFh) to enable system FAN. After 10 seconds when detecting FANIN1 signal, assuming the fan has been fully turned on, the fan speed count detected will be recorded in the register.". Dunno if it should be removed?

Quoted 9 lines

Oh, I see, it is recording the maximum possible speed. It should be marked read-only then, I guess. I am also reluctant to naming this feature fan1_max, even if we don't use that name yet, because the _max suffix is only used for limits at the moment so it might be confusing to use _max for something else now. Maybe fan1_full? This should be discussed separately. In the meantime, I suggest that you omit this value in libsensors.

It is alreadt readonly. I think renaming to full is a good idea, that's what the
datasheet calls it as well.

Quoted 5 lines

fan1_min = 0 isn't an error per se. If you see an error, then something else must be wrong. Can you read the value from fan1_min directly from sysfs?

it was not getting updated in f75375_update_device, fixed. The actual value should
be written to the chip anyway.

Quoted 8 lines

temp1_max_hyst is supposed to represent the hysteresis temperature value for the temp1_max limit, and the value should be passed as the 3rd argument to print_temp_info(). If it reads 0, maybe that's a driver bug. Again, try reading the value directly from sysfs. And please report the problems you find to the driver author so that he can fix them.

This weirder, it should actually update it properly.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

{ "coretemp", print_coretemp },
{ "dme1737", print_dme1737 },
{ "applesmc", print_applesmc },
+ { "F75373", print_f75373 },

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Should be "f75373", no capital. I'm even surprised it worked with the capital.

I see. This suggests that the driver itself identifies the chip as F75373, and that's not correct. You need to put "f75373" in sensors, and the driver needs to be updated in the same way.

This is being set as the client->name, I'll change that to lower case.

Quoted 5 lines

Except for the leading capital, yes, it's OK. That being said, what's the difference between the F75373 and the F75375? If the F75375 has less inputs, then you'll need to adjust the code in "sensors" to not try to display the missing inputs.

The main difference is that F75375 supports more fan speed control modes than
F75373: automatic temperature triggered fan-speed setting and linear voltage feeding
to fan. Only the latter is supported by the driver atm.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#11 lore raw
In reply to Christian Emmerich
Quoted 12 lines
Quoted 3 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page
( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm. So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Thus this algorithm actually return sane RPM values for you? Now I remember why I did not use this - Here the "Count" rises linear, which makes "RPM =(1.5×10^6)/ Count" *lower* when fan speed increases. OTOH it might be the fan is just too small and thus rotates too fast to be reliably measured..

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#12 lore raw
In reply to Christian Emmerich

Hello

Quoted 12 lines
Quoted 11 lines
Quoted 2 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page
( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm. So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Quoted 5 lines

Thus this algorithm actually return sane RPM values for you? Now I remember why I did not use this - Here the "Count" rises linear, which makes "RPM =(1.5×10^6)/ Count" *lower* when fan speed increases. OTOH it might be the fan is just too small and thus rotates too fast to be reliably measured..

During implementation i tested different values for pwm here are my results:
pwm1 fan1 fanspeed ( using: fanspeed =(1.5×10^6)/ fan1-value )
value value

  13   2600      ~570 rpm
  14   1900       :
  15   1900       :
  23   1100       :
  34    770     ~1950 rpm
   :     :        :
  90    385     ~3900 rpm
  95    375     ~4000 rpm
 100    365     ~4180 rpm
 105    360     ~4230 rpm
 110    345     ~4360 rpm
 115    345     ~4360 rpm
 120    335     ~4500 rpm
 125    330     ~4630 rpm

So if i start my pc the pwm is at ~32 and the fan is turning at ~1800rpm. If i increase the pwm value the value of the counter decreased! So if the pwm value is ~110 the van turns at >4000rpm and the fan1 value is ~365.
The pc i use is a barebone by AOpen with an special mainboard and fan, both comes with the barebone.

best regards
christian.

---------------------------------
Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER!

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#13 lore raw
In reply to Christian Emmerich
Quoted 25 lines · Christian Emmerich
Quoted 5 lines

Thus this algorithm actually return sane RPM values for you? Now I remember why I did not use this - Here the "Count" rises linear, which makes "RPM =(1.5×10^6)/ Count" *lower* when fan speed increases. OTOH it might be the fan is just too small and thus rotates too fast to be reliably measured..

During implementation i tested different values for pwm here are my results:
pwm1 fan1 fanspeed ( using: fanspeed =(1.5×10^6)/ fan1-value )
value value

  13   2600      ~570 rpm
  14   1900       :
  15   1900       :
  23   1100       :
  34    770     ~1950 rpm
   :     :        :
  90    385     ~3900 rpm
  95    375     ~4000 rpm
 100    365     ~4180 rpm
 105    360     ~4230 rpm
 110    345     ~4360 rpm
 115    345     ~4360 rpm
 120    335     ~4500 rpm
 125    330     ~4630 rpm
Quoted 2 lines

So if i start my pc the pwm is at ~32 and the fan is turning at ~1800rpm. If i increase the pwm value the value of the counter decreased!

Yes, this is expected. The counter value is proportional to the time the fan needed to achieve one revolution, so a greater counter means a slower fan and vice versa.

Quoted 3 lines

So if the pwm value is ~110 the van turns at >4000rpm
and the fan1 value is ~365.
The pc i use is a barebone by AOpen with an special mainboard and fan, both comes with the barebone.

It seems to work OK. So the conversion from count to RPM should be moved to the kernel driver.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#14 lore raw
In reply to Christian Emmerich

Hi Jean,

Quoted 3 lines

The reject message explained that you shouldn't be sending HTML mails. This makes your mails more than twice as big as they should, and that explains the reject.

Sorry, i'm not able to change it. I'm using just a freemail account.

Quoted 2 lines

Sounds like a bug in the driver then. Setting pwm1_enable to 0 should turn the fan to full speed.

Fixed, using new driver version lets the fan turn to full speed.

Quoted 6 lines
Quoted 1 line

I try to set limits in sensors.conf but i could see no change.

You must run "sensors -s" after changing the limits
in /etc/sensors.conf for the new limits to be applied. Please test this, this is a good way to test both the libsensors code you added, and the driver itself.

After using "sensors -s" i can see the limits i set in sensors.conf (e.g. "VCC: +1.72 V (min = +1.65 V, max = +1.85 V)"). But a inx_alarm is missing, so i see only the values.
What would be a good value for the sensors.conf.eg entry e.g.
set in0_min 1.72 * 0.95
set in0_max 1.72 * 1.05 ?

Quoted 11 lines
Quoted 8 lines
Quoted 4 lines

Lastly, you really shouldn't have to divide the values by 1000. This suggests that the magnitude wasn't set properly in libsensors (it should be 3, I suggest it is 0). This issue is most probably related to the incorrect symbol names.

I saw values >800V so i thought i have to divide it by 1000 in sensors.conf. Magnitude is 3 and the symbol name is correct now, but the values are still over 800V. What's the reason?

I guess that's a bug in the driver. What values do you see in the in*_input sysfs files?

Fixed, if i use the new driver version i can see correct values (e.g. 1.72V).

Quoted 11 lines
Quoted 10 lines
Quoted 2 lines

This means that the driver isn't reporting the values in RPM as it should. Usually no compute statement is needed for fans.

That's correct, the value is not in RPM, in the document '2005111153128.pdf' you can download on the fintek page ( http://www.fintek.com.tw/eng/products.asp?BID=4&SID=5 )its written on page 8:
"Determine the fan counter according to:
Count = (1.5×10^6) / RPM "
That means that the driver is reporting the count value, not the rpm.
So i have to compute in sensors.conf:
RPM = (1.5×10^6)/ Count

Quoted 3 lines

Almost all chips do that, but that's not the point. Our sysfs-interface standard says that the conversion to RPM must occur in the driver and not in user-space. So the f75375 driver needs to be updated.

Fixed, if i use the new driver version i can see correct values (e.g. 2329 RPM).

Quoted 19 lines
Quoted 12 lines
Quoted 11 lines
(quoted diff) +7 -0
+#define SENSORS_F75373_FAN_FEATURES(nr) \
+        { { SENSORS_F75373_FAN(nr), "fan" #nr, \
+                NOMAP, NOMAP, R }, \
+                NOSYSCTL, VALUE(2), 0 }, \
+        { { SENSORS_F75373_FAN_MAX(nr), "fan" #nr "_max", \
+                SENSORS_F75373_FAN(nr), SENSORS_F75373_FAN(nr), RW }, \
+                NOSYSCTL, VALUE(1), 0 }, \

Strange, I've never seen a fan speed sensor with a high limit. What does it correspond to exactly? Why don't you display this value in "sensors"?

Quoted 6 lines

I get the information out of the documentation on page 26:
"When power on, the PWMOUT1 will output full duty cycle (FFh) to enable system FAN. After 10 seconds when detecting FANIN1 signal, assuming the fan has been fully turned on, the fan speed count detected will be recorded in the register.". Dunno if it should be removed?

Quoted 7 lines

Oh, I see, it is recording the maximum possible speed. It should be marked read-only then, I guess. I am also reluctant to naming this feature fan1_max, even if we don't use that name yet, because the _max suffix is only used for limits at the moment so it might be confusing to use _max for something else now. Maybe fan1_full? This should be discussed separately. In the meantime, I suggest that you omit this value in libsensors.

I have omited the fan1_max/_full part.

Quoted 16 lines
Quoted 8 lines
Quoted 7 lines
(quoted diff) +3 -0
+        { { SENSORS_F75373_FAN_MIN(nr), "fan" #nr "_min", \
+                SENSORS_F75373_FAN(nr), NOMAP, R }, \
+                NOSYSCTL, VALUE(1), 0 }

SENSORS_F75373_FAN(nr) instead of NOMAP.

Is it really read-only?

Quoted 7 lines

I changed it to SENSORS_F75373_FAN(nr), it is RW.
But fanX_min is allways zero, so it lead to an error on calling 'sensors_get_feature(*name, SENSORS_F75373_FAN_MIN(i), &min)', i have to disable it, sensors output is now
CPU Fan: 1866 RPM (min = 0 RPM)
to
CPU Fan: 1866 RPM

Quoted 3 lines

fan1_min = 0 isn't an error per se. If you see an error, then something else must be wrong. Can you read the value from fan1_min directly from sysfs?

Yes, i read 0 directly from sysfs, but i can set another value, i've discussed it with Riku Voipio, the author of the driver, he said maybe my bios is setting it to zero. Should the fanx_min value be displayed using sensors (e.g. "CPU Fan: 1866 RPM (min = 4242 RPM)" ) ?

Quoted 5 lines
Quoted 2 lines

I only copied it from SENSORS_DME1737_PWM_FEATURES, should i remove it?

Ah, I hadn't noticed that the DME1737 had definitions for PWM. It's more of an exception than the rule. So yes, please remove the PWM stuff.

I deleted the PWM- stuff.

Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
(quoted diff) +5 -0
+    if (valid) {
+      print_label(label, 10);
+      print_temp_info(cur, max, 0, HYST , 0, 0);
+      printf("%s\n", alarm ? "ALARM" : "");
+    }
Quoted 7 lines
Quoted 2 lines

This doesn't make sense. What is SENSORS_F75373_TEMP_HYST exactly? Why do you display it as an alarm?

It was a mistake, i deleted the Alarm output, now it is only printf("\n"), there seems not to be a value for an alarm.
temp1_max_hyst is always zero, i don't now what it is exactly and when it is not zero.

Quoted 7 lines

temp1_max_hyst is supposed to represent the hysteresis temperature value for the temp1_max limit, and the value should be passed as the 3rd argument to print_temp_info(). If it reads 0, maybe that's a driver bug. Again, try reading the value directly from sysfs. And please report the problems you find to the driver author so that he can fix them.

tempx_max_hyst is always zero:
<output>

root@pc:/sys/devices/pci0000:00/0000:00:01.1/i2c-2/2-002d# cat temp1_max_hyst
0
</output>
but i can set it by hand. It's now shown ( e.g. "CPU Temp:    +47°C  (high =   +54°C, hyst =   +41°C)" ).
Quoted 7 lines
Quoted 3 lines

ERROR: Can't get feature `fan1_min' data! CPU PWM: 31.00 (pwm1)
What's the reason? Did I still have to use "F75373"?

I see. This suggests that the driver itself identifies the chip as F75373, and that's not correct. You need to put "f75373" in sensors, and the driver needs to be updated in the same way.

Fixed in the driver.

Quoted 17 lines
Quoted 7 lines
Quoted 6 lines

Also, what about the F75375 support? As far as I know the f75375s
driver
supports both chips, so it'd be nice to have user-space support for both. Also, it might be less confusing to use F75375 for all the libsensors defines, rather than F75373, so that they match the driver name.

Quoted 9 lines

I changed every define/function from F75373 to F75375, i added also:
#define SENSORS_F75373_PREFIX "f75373"
#define SENSORS_F75375_PREFIX "f75375"
and
{ SENSORS_F75375_PREFIX, f75375_features },
{ SENSORS_F75373_PREFIX, f75375_features },
and
{ "F75375", print_f75375 },
{ "F75373", print_f75375 },

Quoted 4 lines

Except for the leading capital, yes, it's OK. That being said, what's the difference between the F75373 and the F75375? If the F75375 has less inputs, then you'll need to adjust the code in "sensors" to not try to display the missing inputs.

Fixed i can now use f75375 & f75373.

best regards
christian.

---------------------------------
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer Startseite!

etc/sensors.conf.eg +20 -0
diff -urN lm-sensors_org/etc/sensors.conf.eg lm-sensors/etc/sensors.conf.eg
@@ -2927,3 +2927,23 @@
     compute in6       (@ * 5.25), (@ / 5.25)
     compute in7       (@ * 2), (@ / 2)
     compute in8       (@ * 2), (@ / 2)
+
+
+#
+# Sample configuration for the Fintek F75375/F75373S
+#
+chip "f75375-*" "f75373-*"
+
+# Voltages
+   label in0 "VCC"
+   label in1 "V1"
+   label in2 "V2"
+   label in3 "V3"
+    
+# Fans
+   label fan1 "CPU Fan"
+   label fan2 "Sys Fan"
+
+# Temperatures
+   label temp1 "CPU Temp"
+   label temp2 "Sys Temp"
lib/chips.c +45 -0

56 lines not on this page · raw message

lib/chips.h +21 -0
diff -urN lm-sensors_org/lib/chips.h lm-sensors/lib/chips.h
@@ -2337,4 +2337,25 @@
 #define SENSORS_F71882FG_TEMP_FAULT(n)		(140 + (n))
 #define SENSORS_F71882FG_TEMP_TYPE(n)		(150 + (n))
 
+/* Fintek F75375/F75373S registers  */
+
+#define SENSORS_F75373_PREFIX "f75373"
+#define SENSORS_F75375_PREFIX "f75375"
+
+/* voltage n from 1 to 4 */
+#define SENSORS_F75375_IN(nr)           (0x01 + (nr))
+#define SENSORS_F75375_IN_MAX(nr)       (0x11 + (nr) * 2)
+#define SENSORS_F75375_IN_MIN(nr)       (0x21 + (nr) * 2)
+
+/* temp n from 1 to 2 */
+#define SENSORS_F75375_TEMP(nr)         (0x31 + (nr))
+#define SENSORS_F75375_TEMP_MAX(nr)     (0x41 + (nr) * 2)
+#define SENSORS_F75375_TEMP_HYST(nr)    (0x51 + (nr) * 2)
+
+/* fan n from 1 to 2 */
+#define SENSORS_F75375_FAN(nr)          (0x61 + (nr) * 2)
+#define SENSORS_F75375_FAN_MIN(nr)      (0x71 + (nr) * 2)
+/* FAN Full Speed Count Register */
+#define SENSORS_F75375_FAN_FULL(nr)      (0x81 + (nr) * 0x10)
+
 #endif /* def LIB_SENSORS_CHIPS_H */
prog/sensors/chips.c +83 -0

89 lines not on this page · raw message

prog/sensors/chips.h +1 -0
diff -urN lm-sensors_org/prog/sensors/chips.h lm-sensors/prog/sensors/chips.h
@@ -80,5 +80,6 @@
 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_f75375(const sensors_chip_name *name);
 
 #endif /* def PROG_SENSORS_CHIPS_H */
prog/sensors/main.c +2 -0
diff -urN lm-sensors_org/prog/sensors/main.c lm-sensors/prog/sensors/main.c
@@ -426,6 +426,8 @@
  	{ "dme1737", print_dme1737 },
 	{ "applesmc", print_applesmc },
 	{ "f71882fg", print_f71882fg },
+        { "f75375", print_f75375 },
+        { "f75373", print_f75375 },
 	{ NULL, NULL }
 };
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors