On středa 26. května 2021 17:40:17 CEST, Guenter Roeck wrote:
The MAX31790 has two sets of registers for pwm duty cycles, one to request a duty cycle and one to read the actual current duty cycle. Both do not have to be the same. When reporting the pwm duty cycle to the user, the actual pwm duty cycle from pwm duty cycle registers needs to be reported. When setting it, the pwm target duty cycle needs to be written. Since we don't know the actual pwm duty cycle after a target pwm duty cycle has been written, set the valid flag to false to indicate that actual pwm duty cycle should be read from the chip instead of using cached values. Cc: Jan Kundrát <jan.kundrat@xxxxxxxxx> Cc: Václav Kubernát <kubernat@xxxxxxxxx> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Reviewed-by: Jan Kundrát <jan.kundrat@xxxxxxxxx> Cheers, Jan