Commit 548373bb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] bugfix for initialization bug in adm1021 driver

From: Rusty Lynch <rusty@linux.co.intel.com>

While initializing the adm1021 device, the driver is performing a conversion
from fixed point to Celcius on values that were declaired as Celcius.  On my
Dell Precision 220 this results in a shutdown after a couple of minutes
running.

The latch simply removes the conversion.
parent 5e46b7f3
...@@ -356,13 +356,13 @@ static void adm1021_init_client(struct i2c_client *client) ...@@ -356,13 +356,13 @@ static void adm1021_init_client(struct i2c_client *client)
{ {
/* Initialize the adm1021 chip */ /* Initialize the adm1021 chip */
adm1021_write_value(client, ADM1021_REG_TOS_W, adm1021_write_value(client, ADM1021_REG_TOS_W,
TEMP_TO_REG(adm1021_INIT_TOS)); adm1021_INIT_TOS);
adm1021_write_value(client, ADM1021_REG_THYST_W, adm1021_write_value(client, ADM1021_REG_THYST_W,
TEMP_TO_REG(adm1021_INIT_THYST)); adm1021_INIT_THYST);
adm1021_write_value(client, ADM1021_REG_REMOTE_TOS_W, adm1021_write_value(client, ADM1021_REG_REMOTE_TOS_W,
TEMP_TO_REG(adm1021_INIT_REMOTE_TOS)); adm1021_INIT_REMOTE_TOS);
adm1021_write_value(client, ADM1021_REG_REMOTE_THYST_W, adm1021_write_value(client, ADM1021_REG_REMOTE_THYST_W,
TEMP_TO_REG(adm1021_INIT_REMOTE_THYST)); adm1021_INIT_REMOTE_THYST);
/* Enable ADC and disable suspend mode */ /* Enable ADC and disable suspend mode */
adm1021_write_value(client, ADM1021_REG_CONFIG_W, 0); adm1021_write_value(client, ADM1021_REG_CONFIG_W, 0);
/* Set Conversion rate to 1/sec (this can be tinkered with) */ /* Set Conversion rate to 1/sec (this can be tinkered with) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment