From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FAAA30DD00 for ; Fri, 31 Jul 2026 14:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785507545; cv=none; b=maqhEDBahTZAAePpF52MO+6tY0sJ5CoULqRfwvNGMRxMphH310/VY62y3Pe5KoMXjX6tP2WMxsPMG4H+6fPbm8DYZ4GCwbjEJZLLQGrY9sOz6S1FDQWhplmpbZLtsaNYdkHvUkU3+LlESVg6f+IzO+xjnhZDbgzOvizQjpOzA20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785507545; c=relaxed/simple; bh=qGQfqnawWpbY+XpHbq61+Pa6BFYANsxyv4TEz4tj5Gg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y13WtTY4J96MI5gJ+A7Ij2t9PGVUtQDiiJkyU9HUgiBcNaM4TNXbUbyNJUMSPDmQ+DqhtOhmfwI5CGpMKLDmZyjq3I1T1VWg6AaUDZ8HELIJCVMZa/ZtDzHdHNJdtWaklCWNTPuQ7l3p0kT7UfSgmKL06pmxVRG6AWuvojPI9XI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gxxj2Acv; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gxxj2Acv" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-38dcbade417so1027679a91.1 for ; Fri, 31 Jul 2026 07:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785507543; x=1786112343; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to:content-type; bh=fTYBSSPgB/XegWgUFYA7t76lgdxNVuQG5kRcXDSKizY=; b=gxxj2AcvXEQGpXlAcxymx/JXDWlZsYmJglxVR+HGqXARVLnZtgjt9tCJczHg8lu6NG Fya95z4gR67qdag8HZTXwNsu/oZZWzWDFWn6U5b1mqqKmCXmjB4+ZY8qexSUHchfxScp UlAZQmSflwjm5DDhSUc/xBdnOCcDzK+1bzeGm012PoiizFT1bp8XG6vSFUwK50ucR0DY lsxsdlA6MTWeo7eL2l2KhJoLuJYQdWWfKSYQz+2VY9PVAo3d96an9A1VIX+qAhlk9Gvm 5qRfX85gApOLrkRZph5yBxrgqmb+Me1fzV++MYj2oLcy4sdcLzoqtwxxaelCMZJ34y+y yiHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785507543; x=1786112343; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fTYBSSPgB/XegWgUFYA7t76lgdxNVuQG5kRcXDSKizY=; b=pcxex/lGyQYjJF0Lw4PI6GYMTXMyuBUnjIsHUbEyeC2Nfg948f/s/qX+/X7QxBz2Le Gyi5dpQnzOb+d5h3kuGaZK5uzdJACmdAXy0+OsddEiPVE7ELQ9uxwJAMsIJQzaJwlIMk rf/HuiUmC4ywBWXS//8cCS7WCLsjcZDuTN2XhtgHH5+gi70zQdXgNt4xWXfGtOR18YBG k/MXruKMCy2rzdSs+EHtUWUcZN8Zde0LoAlJkcv+V7AA8ho29kzPJ+1v1ab2oAhORrSb SYS0ASazQsSq3FxVnpx2YKS7ohOQPQPN/W1jdlyEsPCOMo/3B3vDyiS9bb2cpyzZQXJW BudA== X-Forwarded-Encrypted: i=1; AHgh+RqZAcB+qpej+yH4H35w760ofVwUvWTxIlM/bP3ljz71cieRbzvhnrusN3YlldfT4cLO9cs0vvUd0karMWs=@vger.kernel.org X-Gm-Message-State: AOJu0Ywf+25qFow4f62NNz6FV+ooRObU8NuyLfSBM6F9vbftpI4AOaas fw/ijenDu6/aT52hq21jPZs7FWPoH0sHUQdKuUl0/4lZnN6EsUQdt992 X-Gm-Gg: AR+sD12Ndioe58YwkAgitmtXogXcO5wFegVarLGPyta38DesugGXx7hY/UUABC6BbGe 7aEKtj60rdw/jwqx2c9Rdo0892X7WLXFYaK99UNcSwIHh4ep09yJ+NUHmg0HhAOYcCHicZ38IiN zybmuRgfAYsVtUbHnCI09tLLrB3YqJjVibHJk67iRa4CweLtkcjYCWqlmv+NfZ/1/AeOXI7/SBS WImjJ3LXsgm/LG9y8Hc2f3/DyAe8kF0aIUijpHNc8iUVN+MzO43W5HXsi4TZmbxJMpVGewJwNFv PtSJCBfcDVNr4GdVMnQSiePre38JegwCBOpVsaGrtTU+/0NvRYXjoYLTK8zA32696f0VX6elQUP FsvGPw+rQTc4f6WYU6pxj5eG7xHdcMCbbgovZy/qm+VmbF0K/E1IeQMoa3iY9yXZ22ERidDU9Aq 4C9OtLOtC39UJ95pw03uln5bqt4gqyI4F+h6xqrUxtkJOiHxLygLbMfYFBOOSsQri/BD0fwXcei Sw= X-Received: by 2002:a17:90b:2741:b0:381:6c5:3f63 with SMTP id 98e67ed59e1d1-38fbc3e5978mr128907a91.6.1785507543167; Fri, 31 Jul 2026 07:19:03 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38fb2962928sm760497a91.3.2026.07.31.07.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 07:19:02 -0700 (PDT) Sender: Guenter Roeck Date: Fri, 31 Jul 2026 07:19:01 -0700 From: Guenter Roeck To: Matti Vaittinen Cc: Matti Vaittinen , Matti Vaittinen , Wim Van Sebroeck , Lee Jones , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog: bd96801_wdt: Fix timeout for enabled WDG Message-ID: <171ccbd1-0a65-4ba5-ad63-16cff58d3977@roeck-us.net> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jul 31, 2026 at 12:36:28PM +0300, Matti Vaittinen wrote: > From: Matti Vaittinen > > 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/20260722085819.495211F000E9@smtp.kernel.org/ > 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 > 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