Skip to contentSkip to conversation

New sensors program patch for SMSC47M192

PATCH New Hartmut Rick 2 participants 2 messages Mar 22, 2006 – Mar 28, 2006 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 New sensors program patch for SMSC47M192

Hi Jean, and everybody else,

Thanks for the review of my user-space patch, and for all the comments and suggestions.
Here is a new patch that should work together with the latest smsc47m192 driver. The patch applies to lm_sensors-2.10.0.

Quoted 2 lines · Jean Delvare

For temperatures, the Linux 2.4 standard is VALUE(1) for the high limit and VALUE(2) for the low limit. This still doesn't affect your Linux 2.6

Ok, I've changed that for the temperatures. Does the same comment apply also to voltages?

Otherwise I hope I've included all your comments.

Best regards,
Hartmut
-------------- next part --------------

etc/sensors.conf.eg +53 -0
diff -uprN lm_sensors-2.10.0/etc/sensors.conf.eg lm_sensors-2.10.0n/etc/sensors.conf.eg
@@ -2141,6 +2141,59 @@ chip "smsc47m1-*"
 #    set fan1_min 3000
 #    set fan2_min 3000
 
+chip "smsc47m192-*"
+
+# Temperature and voltage input from SMSC LPC47M192 and LPC47M997 chips
+# This example works on a Gigabyte K8U motherboard
+# Voltages are scaled internally, no computations needed
+
+    label in0 "+2.5V"
+    set in0_min  2.5 * 0.95
+    set in0_max  2.5 * 1.05
+
+    label in1 "VCore"
+    set in1_min  vid * 0.95
+    set in1_max  vid * 1.05
+
+    label in2 "+3.3V"
+    set in2_min  3.3 * 0.95
+    set in2_max  3.3 * 1.05
+
+    label in3 "+5V"
+    set in3_min  5.0 * 0.95
+    set in3_max  5.0 * 1.05
+
+    label in4 "+12V"
+    set in4_min  12.0 * 0.95
+    set in4_max  12.0 * 1.05
+
+    label in5 "VCC"
+    set in5_min  3.3 * 0.95
+    set in5_max  3.3 * 1.05
+
+    label in6 "+1.5V"
+    set in6_min  1.5 * 0.95
+    set in6_max  1.5 * 1.05
+#   ignore in6
+
+    label in7 "+1.8V"
+    set in7_min  1.8 * 0.95
+    set in7_max  1.8 * 1.05
+#   Haven't yet heard from any board that has 1.8V connected, so
+#   this might be more appropriate:
+#   ignore in7
+    
+    label temp1 "Chip Temp"
+#    set temp1_min   0
+#    set temp1_max   60
+
+    label temp2 "CPU Temp"
+#    set temp2_min   0
+#    set temp2_max   60
+
+    label temp3 "Sys Temp"
+#    set temp3_min   0
+#    set temp3_max   60
 
 #
 # This example was tested vs. Asus P4S333
lib/chips.c +100 -0

111 lines not on this page · raw message

lib/chips.h +15 -0
diff -uprN lm_sensors-2.10.0/lib/chips.h lm_sensors-2.10.0n/lib/chips.h
@@ -1747,6 +1747,21 @@
 #define SENSORS_SMSC47M1_FAN2_DIV 76 /* RW */
 #define SENSORS_SMSC47M1_ALARMS 81 /* R */
 
+#define SENSORS_SMSC47M192_PREFIX "smsc47m192"
+
+#define SENSORS_SMSC47M192_IN(n)		(1 + (n))	/* R */
+#define SENSORS_SMSC47M192_IN_MIN(n)		(21 + (n))	/* RW */
+#define SENSORS_SMSC47M192_IN_MAX(n)		(41 + (n))	/* RW */
+#define SENSORS_SMSC47M192_IN_ALARM(n)		(61 + (n))	/* R */
+#define SENSORS_SMSC47M192_TEMP(n)		(100 + (n))	/* R */
+#define SENSORS_SMSC47M192_TEMP_MAX(n)		(120 + (n))	/* RW */
+#define SENSORS_SMSC47M192_TEMP_MIN(n)		(140 + (n))	/* RW */
+#define SENSORS_SMSC47M192_TEMP_OFFSET(n)	(160 + (n))	/* RW */
+#define SENSORS_SMSC47M192_TEMP_ALARM(n)	(180 + (n))	/* R */
+#define SENSORS_SMSC47M192_TEMP_FAULT(n)	(200 + (n))	/* R */
+#define SENSORS_SMSC47M192_VID			301		/* R */
+#define SENSORS_SMSC47M192_VRM			302		/* RW */
+
 #define SENSORS_PC87360_PREFIX "pc87360"
 #define SENSORS_PC87363_PREFIX "pc87363"
 #define SENSORS_PC87364_PREFIX "pc87364"
prog/detect/sensors-detect +1 -1
diff -uprN lm_sensors-2.10.0/prog/detect/sensors-detect lm_sensors-2.10.0n/prog/detect/sensors-detect
@@ -1478,7 +1478,7 @@ use subs qw(mtp008_detect lm78_detect lm
      },
      {
        name => "SMSC LPC47M15x, LPC47M192 or LPC47M997",
-       driver => "to-be-written",
+       driver => "smsc47m192",
        i2c_addrs => [0x2c..0x2d],
        i2c_detect => sub { smsc47m192_detect @_ },
      },
prog/sensors/chips.c +52 -0

58 lines not on this page · raw message

prog/sensors/chips.h +1 -0
diff -uprN lm_sensors-2.10.0/prog/sensors/chips.h lm_sensors-2.10.0n/prog/sensors/chips.h
@@ -55,6 +55,7 @@ extern void print_fscher(const sensors_c
 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);
prog/sensors/main.c +1 -0
diff -uprN lm_sensors-2.10.0/prog/sensors/main.c lm_sensors-2.10.0n/prog/sensors/main.c
@@ -388,6 +388,7 @@ struct match matches[] = {
 	{ "fscher", print_fscher },
 	{ "pcf8591", print_pcf8591 },
 	{ "vt1211", print_vt1211 },
+	{ "smsc47m192", print_smsc47m192 },
 	{ "smsc47m1", print_smsc47m1 },
 	{ "pc87360", print_pc87360 },
 	{ "pc87363", print_pc87360 },
#1 lore raw

PATCH 1/1 New sensors program patch for SMSC47M192

Hi Hartmut,

Sorry for the late reply...

Quoted 5 lines
Quoted 2 lines

For temperatures, the Linux 2.4 standard is VALUE(1) for the high limit and VALUE(2) for the low limit. This still doesn't affect your Linux 2.6

Ok, I've changed that for the temperatures. Does the same comment apply also to voltages?

No, voltages have it the other way around. Don't ask ;)

Quoted 1 line

Otherwise I hope I've included all your comments.

Looks all OK, I just applied it to lm_sensors CVS. Thanks a lot for the good work Hartmut!

Signature · 1 line
Jean Delvare