summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm63.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2012-01-16 22:51:46 +0100
committerJean Delvare <khali@endymion.delvare>2012-01-16 22:51:46 +0100
commit409c0b5bdf7d80e61380ce6b226b98405576d7cc (patch)
treec9c3f4d9ad0d74203599db8d77768a2676b22812 /drivers/hwmon/lm63.c
parentf496b2d4f181fa5fcdf24016b11caaa33eb12477 (diff)
hwmon: (lm63) LM64 has a dedicated pin for tachometer
On the LM64, the tachometer function has a dedicated pin and fan speed monitoring is always enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/lm63.c')
-rw-r--r--drivers/hwmon/lm63.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
index 75e3a15c2f61..0c4fff0a00a4 100644
--- a/drivers/hwmon/lm63.c
+++ b/drivers/hwmon/lm63.c
@@ -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);
@@ -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);