Re: [hwmon PATCH v2 1/8] hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors
Guenter Roeck <[email protected]> Mon, 27 Jul 2026 17:53:49 -0700
| Newsgroups | org.kernel.vger.linux-hwmon,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jul 27, 2026 at 09:22:17PM -0300, Luiz Angelo Daros de Luca wrote: > 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]> Applied. Thanks, Guenter