Re: [PATCH] hwmon: (aquacomputer_d5next) Set fan to direct PWM mode when writing value
From: Guenter Roeck
Date: Sat Feb 17 2024 - 13:25:02 EST
On 2/17/24 10:15, Aleksa Savic wrote:
When setting a PWM value for a fan channel, ensure that the device
is actually in direct PWM value mode, as it could be in PID, curve or
fan following mode from previous user configurations. The byte
signifying the channel mode is just behind the offset for the value.
Otherwise, setting PWM speed might result in a no-op from the point
of the user.
You can require that a device is in manual mode when setting pwm
modes, and return an error if it isn't. However, changing the mode
to manual automatically when a pwm value is written is not acceptable.
Guenter