diff options
-rw-r--r-- | Documentation/hwmon/w83781d | 5 | ||||
-rw-r--r-- | drivers/hwmon/w83781d.c | 22 |
2 files changed, 26 insertions, 1 deletions
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d index ac155d8b0fef..b1e9f80098ee 100644 --- a/Documentation/hwmon/w83781d +++ b/Documentation/hwmon/w83781d | |||
@@ -36,6 +36,11 @@ Module parameters | |||
36 | Use 'init=0' to bypass initializing the chip. | 36 | Use 'init=0' to bypass initializing the chip. |
37 | Try this if your computer crashes when you load the module. | 37 | Try this if your computer crashes when you load the module. |
38 | 38 | ||
39 | * reset int | ||
40 | (default 0) | ||
41 | The driver used to reset the chip on load, but does no more. Use | ||
42 | 'reset=1' to restore the old behavior. Report if you need to do this. | ||
43 | |||
39 | force_subclients=bus,caddr,saddr,saddr | 44 | force_subclients=bus,caddr,saddr,saddr |
40 | This is used to force the i2c addresses for subclients of | 45 | This is used to force the i2c addresses for subclients of |
41 | a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b' | 46 | a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b' |
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index 782117817526..8b17132f6b94 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c | |||
@@ -57,6 +57,10 @@ I2C_CLIENT_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f); | |||
57 | I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " | 57 | I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " |
58 | "{bus, clientaddr, subclientaddr1, subclientaddr2}"); | 58 | "{bus, clientaddr, subclientaddr1, subclientaddr2}"); |
59 | 59 | ||
60 | static int reset; | ||
61 | module_param(reset, bool, 0); | ||
62 | MODULE_PARM_DESC(reset, "Set to one to reset chip on load"); | ||
63 | |||
60 | static int init = 1; | 64 | static int init = 1; |
61 | module_param(init, bool, 0); | 65 | module_param(init, bool, 0); |
62 | MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization"); | 66 | MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization"); |
@@ -1460,8 +1464,17 @@ w83781d_init_client(struct i2c_client *client) | |||
1460 | int type = data->type; | 1464 | int type = data->type; |
1461 | u8 tmp; | 1465 | u8 tmp; |
1462 | 1466 | ||
1463 | if (init && type != as99127f) { /* this resets registers we don't have | 1467 | if (reset && type != as99127f) { /* this resets registers we don't have |
1464 | documentation for on the as99127f */ | 1468 | documentation for on the as99127f */ |
1469 | /* Resetting the chip has been the default for a long time, | ||
1470 | but it causes the BIOS initializations (fan clock dividers, | ||
1471 | thermal sensor types...) to be lost, so it is now optional. | ||
1472 | It might even go away if nobody reports it as being useful, | ||
1473 | as I see very little reason why this would be needed at | ||
1474 | all. */ | ||
1475 | dev_info(&client->dev, "If reset=1 solved a problem you were " | ||
1476 | "having, please report!\n"); | ||
1477 | |||
1465 | /* save these registers */ | 1478 | /* save these registers */ |
1466 | i = w83781d_read_value(client, W83781D_REG_BEEP_CONFIG); | 1479 | i = w83781d_read_value(client, W83781D_REG_BEEP_CONFIG); |
1467 | p = w83781d_read_value(client, W83781D_REG_PWMCLK12); | 1480 | p = w83781d_read_value(client, W83781D_REG_PWMCLK12); |
@@ -1478,6 +1491,13 @@ w83781d_init_client(struct i2c_client *client) | |||
1478 | w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0); | 1491 | w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0); |
1479 | } | 1492 | } |
1480 | 1493 | ||
1494 | /* Disable power-on abnormal beep, as advised by the datasheet. | ||
1495 | Already done if reset=1. */ | ||
1496 | if (init && !reset && type != as99127f) { | ||
1497 | i = w83781d_read_value(client, W83781D_REG_BEEP_CONFIG); | ||
1498 | w83781d_write_value(client, W83781D_REG_BEEP_CONFIG, i | 0x80); | ||
1499 | } | ||
1500 | |||
1481 | data->vrm = vid_which_vrm(); | 1501 | data->vrm = vid_which_vrm(); |
1482 | 1502 | ||
1483 | if ((type != w83781d) && (type != as99127f)) { | 1503 | if ((type != w83781d) && (type != as99127f)) { |