Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2363239ybl; Mon, 20 Jan 2020 01:19:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxoR+VvCwL59/IkZWuWl/nntUBNWpOEMlWNo0ZOYoiqI8a2L1KkdxFS67egfHe9qwVOm+sO X-Received: by 2002:a9d:750b:: with SMTP id r11mr15731873otk.209.1579511990574; Mon, 20 Jan 2020 01:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579511990; cv=none; d=google.com; s=arc-20160816; b=aceQYA4yEym+erl8Srv+Daes0auTh2UFaEMJVOShDI+QEywg1zE4fk6pBY2WykgbG2 olEkSFhlwOKfoPKYz1dr2oLMqqPtTF3IfgI8N7BnXmt1bHFrBYZjGAgVnugJHQO722a5 j0Kvb+7H5xHkE9ljLHew7FQH8OrYPAS24dIU+8LVx07ACEAFlbNXFqFK42Ls+7BUYtRY wj4cJAsgs7tI16VS9r/9jdmeoGZwfuR2Gneq5pd9G8rljNc3jHGRfAAJjV+w/dtaw3yL k8EJqzSow9A/srEBTV5C+H+JK5naZnfgdj+z4gMF5zjIy+7Zd2AqTvpcT+O/6n7m0DEz AE3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jcCALdlpagmFP5eJkC1a5zcXpX6wHE1wQkr7ageheTQ=; b=OrFvmCs2EBSeU15S1/fMQFYowwyXPtaCqJP2syy204VEzLPRcNYgrrQV5EUmX7Hkj4 i059r9ceGyIhQSv34mjldCGPOQH+z2JdypT73dfJlzNZlGE1LerDPUvWbtl/Slc+PcR0 JChG6FertrhDtQ0zwrH+hYMg17eYuyVJod/I4P2ta16oisD6xySDGWmHwDetLLJ7QrKt x67/hoX3HuWA7xOWtrEUumlDKj2ZsQw7AO89pRge4XMSQGC20n39kpADYC4IrYQNJJMd ApE570M6jLb++dEaMUNrz/snpcRiA6SGBoARDhHWd/9zxtxVDMjYkYCCA4gcIn8dhTZA 2dyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si16554701oij.175.2020.01.20.01.19.38; Mon, 20 Jan 2020 01:19:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgATJRj (ORCPT + 99 others); Mon, 20 Jan 2020 04:17:39 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:34211 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbgATJRj (ORCPT ); Mon, 20 Jan 2020 04:17:39 -0500 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itTBc-0005op-C8; Mon, 20 Jan 2020 10:17:32 +0100 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1itTBb-0000TQ-SF; Mon, 20 Jan 2020 10:17:31 +0100 From: Marco Felsch To: support.opensource@diasemi.com, linux@roeck-us.net, stwiss.opensource@diasemi.com, Adam.Thomson.Opensource@diasemi.com Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] watchdog: da9062: do not ping the hw during stop() Date: Mon, 20 Jan 2020 10:17:29 +0100 Message-Id: <20200120091729.16256-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The da9062 hw has a minimum ping cool down phase of at least 200ms. The driver takes that into account by setting the min_hw_heartbeat_ms to 300ms and the core guarantees that the hw limit is observed for the ping() calls. But the core can't guarantees the required minimum ping cool down phase if a stop() command is send immediately after the ping() command. So it is not allowed to ping the watchdog within the stop() command as the driver do. Remove the ping can be done without doubts because the watchdog gets disabled anyway and a (re)start reset the watchdog counter too. Signed-off-by: Marco Felsch --- drivers/watchdog/da9062_wdt.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index 77b6b5336067..0ad15d55071c 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -97,13 +97,6 @@ static int da9062_wdt_stop(struct watchdog_device *wdd) struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); int ret; - ret = da9062_reset_watchdog_timer(wdt); - if (ret) { - dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n", - ret); - return ret; - } - ret = regmap_update_bits(wdt->hw->regmap, DA9062AA_CONTROL_D, DA9062AA_TWDSCALE_MASK, -- 2.20.1