aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Tung <[email protected]>2024-07-01 15:32:52 +0800
committerGuenter Roeck <[email protected]>2024-07-01 15:45:57 -0700
commit39b24cced70fdc336dbc0070f8b3bde61d8513a8 (patch)
tree1f08b5c51cd0da0db65e4bb6489473fc45d1185d
parentb3e992f69c239b0eb99c408c1ca9cd4253d2e7ad (diff)
hwmon: (adt7475) Fix default duty on fan is disabled
According to the comments on fan is disabled, we change to manual mode and set the duty cycle to 0. For setting the duty cycle part, the register is wrong. Fix it. Fixes: 1c301fc5394f ("hwmon: Add a driver for the ADT7475 hardware monitoring chip") Signed-off-by: Wayne Tung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
-rw-r--r--drivers/hwmon/adt7475.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c
index 5f78e6633018..bc186c61a2c0 100644
--- a/drivers/hwmon/adt7475.c
+++ b/drivers/hwmon/adt7475.c
@@ -1896,7 +1896,7 @@ static void adt7475_read_pwm(struct i2c_client *client, int index)
data->pwm[CONTROL][index] &= ~0xE0;
data->pwm[CONTROL][index] |= (7 << 5);
- i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index),
+ i2c_smbus_write_byte_data(client, PWM_REG(index),
data->pwm[INPUT][index]);
i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index),