Skip to contentSkip to conversation

hwmon-vid: Be quiet if CPU has no VID pins

PATCH New Jean Delvare 1 participant 1 message Sep 22, 2008 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon-vid: Be quiet if CPU has no VID pins

There's no point in warning the user about the "unknown VRM version" of his/her CPU is we know that said CPU has no VID pins. Better just keep quiet in this case.

---
Rudolf, what do you think?
David, I guess that you don't have the opportunity to test this patch?

 drivers/hwmon/hwmon-vid.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/hwmon/hwmon-vid.c +6 -1
@@ -1,7 +1,8 @@
 /*
  * hwmon-vid.c - VID/VRM/VRD voltage conversions
  *
- * Copyright (c) 2004 Rudolf Marek <[email protected]>
+ * Copyright (c) 2004-2007 Rudolf Marek <[email protected]>
+ * Copyright (c) 2007-2008 Jean Delvare <[email protected]>
  *
  * Partly imported from i2c-vid.h of the lm_sensors project
  * Copyright (c) 2002 Mark D. Studebaker <[email protected]>
@@ -167,6 +168,7 @@ struct vrm_model {
 };
 
 #define ANY 0xFF
+#define NO_VID 1
 
 #ifdef CONFIG_X86
 
@@ -196,6 +198,7 @@ static struct vrm_model vrm_models[] = {
 	{X86_VENDOR_CENTAUR, 0x6, 0x9, ANY, 17},	/* C3-M, Eden-N */
 	{X86_VENDOR_CENTAUR, 0x6, 0xA, 0x7, 0},		/* No information */
 	{X86_VENDOR_CENTAUR, 0x6, 0xA, ANY, 13},	/* C7, Esther */
+	{X86_VENDOR_NSC, 0x5, 0x9, ANY, NO_VID},	/* Geode */
 	{X86_VENDOR_UNKNOWN, ANY, ANY, ANY, 0}		/* stop here */
 };
 
@@ -239,6 +242,8 @@ u8 vid_which_vrm(void)
 	if (vrm_ret = 0)
 		printk(KERN_INFO "hwmon-vid: Unknown VRM version of your "
 		       "x86 CPU\n");
+	else if (vrm_ret = NO_VID)	/* No warning if no VID pins */
+		vrm_ret = 0;
 	return vrm_ret;
 }
 
Signature · 6 lines
Jean Delvare

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