Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <chineweff@gmail.com>
Link: https://lore.kernel.org/r/20240701073252.317397-1-chineweff@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Wayne Tung and committed by
Guenter Roeck
39b24cce b3e992f6

+1 -1
+1 -1
drivers/hwmon/adt7475.c
··· 1896 1896 data->pwm[CONTROL][index] &= ~0xE0; 1897 1897 data->pwm[CONTROL][index] |= (7 << 5); 1898 1898 1899 - i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index), 1899 + i2c_smbus_write_byte_data(client, PWM_REG(index), 1900 1900 data->pwm[INPUT][index]); 1901 1901 1902 1902 i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index),