Re: [hwmon PATCH v2 1/8] hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors

[email protected] Tue, 28 Jul 2026 00:30:59 +0000
Newsgroups org.kernel.vger.linux-hwmon
Message-ID <[email protected]>
> During adt7470_read_temperatures(), the driver temporarily switches
> the PWM channels to manual mode, performs the temperature collection,
> and then restores the original configuration registers.
> 
> However, if an I2C transaction fails at any point after entering manual
> mode, the function aborts and returns immediately. This leaves the
> configuration registers un-restored, permanently trapping the fans in
> manual mode.
> 
> Introduce a recovery path to ensure that the original PWM configuration
> registers are always restored, even when intermediate I2C operations
> fail.
> 
> Reported-by: [email protected]
> Closes: https://lore.kernel.org/r/[email protected]
> Fixes: ef67959c4253 ("hwmon: (adt7470) Convert to use regmap")
> Signed-off-by: Luiz Angelo Daros de Luca <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1