]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/w83627hf.c
Merge /spare/repo/linux-2.6/
[linux-2.6] / drivers / hwmon / w83627hf.c
index 0466cc4b760e1304ee87162b90f0d1127a669b94..3479dc5208e2d3a9ac8d707177a9b17948e7c65f 100644 (file)
@@ -43,9 +43,8 @@
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/i2c-isa.h>
-#include <linux/i2c-sensor.h>
-#include <linux/i2c-vid.h>
 #include <linux/hwmon.h>
+#include <linux/hwmon-vid.h>
 #include <linux/err.h>
 #include <asm/io.h>
 #include "lm75.h"
@@ -65,6 +64,10 @@ static unsigned short address;
 /* Insmod parameters */
 enum chips { any_chip, w83627hf, w83627thf, w83697hf, w83637hf };
 
+static int reset;
+module_param(reset, bool, 0);
+MODULE_PARM_DESC(reset, "Set to one to reset chip on load");
+
 static int init = 1;
 module_param(init, bool, 0);
 MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");
@@ -1280,7 +1283,15 @@ static void w83627hf_init_client(struct i2c_client *client)
        int type = data->type;
        u8 tmp;
 
-       if(init) {
+       if (reset) {
+               /* Resetting the chip has been the default for a long time,
+                  but repeatedly caused problems (fans going to full
+                  speed...) so it is now optional. It might even go away if
+                  nobody reports it as being useful, as I see very little
+                  reason why this would be needed at all. */
+               dev_info(&client->dev, "If reset=1 solved a problem you were "
+                        "having, please report!\n");
+
                /* save this register */
                i = w83627hf_read_value(client, W83781D_REG_BEEP_CONFIG);
                /* Reset all except Watchdog values and last conversion values
@@ -1317,7 +1328,7 @@ static void w83627hf_init_client(struct i2c_client *client)
                data->vrm = (data->vrm_ovt & 0x01) ? 90 : 82;
        } else {
                /* Convert VID to voltage based on default VRM */
-               data->vrm = i2c_which_vrm();
+               data->vrm = vid_which_vrm();
        }
 
        tmp = w83627hf_read_value(client, W83781D_REG_SCFG1);