Re: [PATCH] watchdog: bd96801_wdt: Fix timeout for enabled WDG
Guenter Roeck <[email protected]> Fri, 31 Jul 2026 07:19:01 -0700
| Newsgroups | org.kernel.vger.linux-watchdog,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 31, 2026 at 12:36:28PM +0300, Matti Vaittinen wrote: > From: Matti Vaittinen <[email protected]> > > When watchdog is enabled at the probe time, the bd96801 driver retrieves > the timeout configuration from the registers to set-up the heart-beat > values. > > As Sashiko pointed out at > https://lore.kernel.org/all/[email protected]/ > the timeout values are incorrectly computed in driver, resulting wrong > heartbeat. This leads to devere problems if watchdog was enabled at probe > time. > > According to the data-sheet, the "too fast" ping limit is configured as > multiple of FASTNG_MIN. Furthermore, the "too slow" ping limit is > configured as multiples of "too fast" timeout. The FASTNG_MIN is set to > 11, meaning 1.1 mS and "too fast" and "too slow" limits are computed from > this. Hence, converting the limits to mS should be done by dividing by 10, > not by dividing by USEC_PER_MSEC. > > Fix this by dividing the timeout values with correct scaling factor. > > Signed-off-by: Matti Vaittinen <[email protected]> > Fixes: 09dad69757b6 ("watchdog: ROHM BD96801 PMIC WDG driver") > --- > > Also, drop an extra whitespace while editing the file - feeling like > that single whitespace fix doesn't warrant own patch. Just let me know if > I feel wrong ;) No problem (since you let me know and didn't do it silently). Applied. Thanks, Guenter