Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285849
b: refs/heads/master
c: 409c0b5
h: refs/heads/master
i:
  285847: af641f6
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jan 16, 2012
1 parent 9d5c2b9 commit 828d004
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f496b2d4f181fa5fcdf24016b11caaa33eb12477
refs/heads/master: 409c0b5bdf7d80e61380ce6b226b98405576d7cc
5 changes: 4 additions & 1 deletion trunk/Documentation/hwmon/lm63
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ value for measuring the speed of the fan. It can measure fan speeds down to
Note that the pin used for fan monitoring is shared with an alert out
function. Depending on how the board designer wanted to use the chip, fan
speed monitoring will or will not be possible. The proper chip configuration
is left to the BIOS, and the driver will blindly trust it.
is left to the BIOS, and the driver will blindly trust it. Only the original
LM63 suffers from this limitation, the LM64 and LM96163 have separate pins
for fan monitoring and alert out. On the LM64, monitoring is always enabled;
on the LM96163 it can be disabled.

A PWM output can be used to control the speed of the fan. The LM63 has two
PWM modes: manual and automatic. Automatic mode is not fully implemented yet
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/hwmon/lm63.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ static void lm63_init_client(struct i2c_client *client)
i2c_smbus_write_byte_data(client, LM63_REG_CONFIG1,
data->config);
}
/* Tachometer is always enabled on LM64 */
if (data->kind == lm64)
data->config |= 0x04;

/* We may need pwm1_freq before ever updating the client data */
data->pwm1_freq = i2c_smbus_read_byte_data(client, LM63_REG_PWM_FREQ);
Expand Down Expand Up @@ -836,9 +839,10 @@ static void lm63_init_client(struct i2c_client *client)
}

/* Show some debug info about the LM63 configuration */
dev_dbg(&client->dev, "Alert/tach pin configured for %s\n",
(data->config & 0x04) ? "tachometer input" :
"alert output");
if (data->kind == lm63)
dev_dbg(&client->dev, "Alert/tach pin configured for %s\n",
(data->config & 0x04) ? "tachometer input" :
"alert output");
dev_dbg(&client->dev, "PWM clock %s kHz, output frequency %u Hz\n",
(data->config_fan & 0x08) ? "1.4" : "360",
((data->config_fan & 0x08) ? 700 : 180000) / data->pwm1_freq);
Expand Down

0 comments on commit 828d004

Please sign in to comment.