Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2046514ybl; Sat, 25 Jan 2020 15:13:31 -0800 (PST) X-Google-Smtp-Source: APXvYqz21S3p+Xyuzv/3DoRCsmsoPIsLFfvuWt2ZISWojO19L2AOSQIqz7mGWoIDRZc5BcDWRwot X-Received: by 2002:aca:f445:: with SMTP id s66mr3309304oih.95.1579994011075; Sat, 25 Jan 2020 15:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579994011; cv=none; d=google.com; s=arc-20160816; b=sA7F4uSm/SYJ8BdV1mnQKrB0u5JI6oV60BU+w+2u2nz7wDnNPwCviZDtMED4FeT3Xv RrSYDfwz5v6wTAgM3ubxVQ4RpkAo4lmGGc7mAEijUy0M2KFoiQbNjzLNBXx0PDCcfwM/ ofMXIiLtMhINfne5g46RxurqmxA8tdjhsbFBfE+NKDWfu0MfH8YIsHxGzCS0zyjOiIXQ O81BxV2F4Za7OnH5+5ngvwXCYzgwp8BYTR4vW+ZoZLQ4tkU8Q9jBF93ak/Cv/qp+P3XV bnWMnERBR2PxqlHCQ3uq34WffuoiDvTH0hH3pquyB5WACCtT6BiVBXsce2aot10G7rW4 BXXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=q6ZcuyUU+doit7kPbsOnRYJCyiBS+m30mXZlkpyEj44=; b=MgGKxSAovwtFrRR1mI5I9U54XF9q6agifZGrLYq1O7NZTcXMZP0CgPoRbySivlzCY7 HFAa7ofnQjc0BuoMfdDbEd2z/6d1uUDk8sfJOGMdoS4mpNP0RWNk2wXFO+T8K2AsBqiL Bi1DFFApK/JcPPRmYLQkYaRtFn2DVWewLHWUT4bb/eLObdWiBuHBzn+MZOhahRz8ERho VTnK/JEjRNIsmzsY4P5LjZIXP1PPWbBUTTuIqyBOAIZQTcflLsqGIQ3ktj1Rujv73Mt/ gdtAqB3c7ey5Mwqvo5bO1viMn8/hUvf7BjD6a+jQZwb86jyaMvORZ/vUTzfACbEVeHJc RAYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fQB14srl; 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 64si3808009otx.50.2020.01.25.15.13.19; Sat, 25 Jan 2020 15:13:31 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fQB14srl; 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 S1728765AbgAYXL3 (ORCPT + 99 others); Sat, 25 Jan 2020 18:11:29 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:43501 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbgAYXL3 (ORCPT ); Sat, 25 Jan 2020 18:11:29 -0500 Received: by mail-yw1-f68.google.com with SMTP id v126so2884989ywc.10; Sat, 25 Jan 2020 15:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=q6ZcuyUU+doit7kPbsOnRYJCyiBS+m30mXZlkpyEj44=; b=fQB14srlFUsvbsthSTN425EVpuNWWWzyduWo5AlYxx2lEoL9J//Q5ycxbL/A6e7UgT 61y4gig+4dTOZCDZsohGst7k1/6JpnDk4t/QYeeB1Shr7mpwyL25rE82WgC9S53po4Uv h9N4aTxFTBU8QAFqdW9GLyVgfZ41KlL3Xp7jhCMlzpgxpU2BD9eXd5a0WdmJRkN+XF2t k+A6tla3JE/kNUo5aHP9tUetwCvzkjatHOYgZrHLZME2FtK892JbrCO+kwpT7pZi3aJz B7Q2+2JGTraJ8BDjVNkbkO8Wgheal79YREK1s5UocneY26wTJ4UI+lL2X2nabopcJlXs mqFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=q6ZcuyUU+doit7kPbsOnRYJCyiBS+m30mXZlkpyEj44=; b=V+3nQLS2g57FxnFx9XPg4zj+ZiYi4Rpf+U7jZx5fRXMsllT91Nwyq/nbcaBzuk+0G6 CnEHumDG7fUuEMMAjU8ZTaJM7VKXSay1qtMkDUQWDsvbOllxAxrMGZMvxgToZlgv+dc7 mlagWywKeWP8wmsnWX72GVQ8WKdGtW34wx8r/K7H573RJSNH8Mv5UsRXwiFCIRpMrIUK LXpkYWyzBLZuauayOPmSB6WwwQqGLj3gpR+OZgmykOofRcn6B/dwi2bmHS4hSVthgokJ uQIVDiLwaM3o9gzm+XHMDEPl6ZGwl03vnZl5/gTJGgFC8qAzo4gZ7sdMrnLk/NjK5QLg l+5g== X-Gm-Message-State: APjAAAXycL05vRkwxuzpKC6U3kMPRZNEA6SXOZMfY2/ESPqMK3Zbn/Mr jQ9zov+VUQpalx86F+5wt4YFclxL X-Received: by 2002:a0d:f5c1:: with SMTP id e184mr7802889ywf.245.1579993888343; Sat, 25 Jan 2020 15:11:28 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d9sm4493140ywh.55.2020.01.25.15.11.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2020 15:11:27 -0800 (PST) Date: Sat, 25 Jan 2020 15:11:26 -0800 From: Guenter Roeck To: Marco Felsch Cc: support.opensource@diasemi.com, stwiss.opensource@diasemi.com, Adam.Thomson.Opensource@diasemi.com, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] watchdog: da9062: do not ping the hw during stop() Message-ID: <20200125231126.GA25513@roeck-us.net> References: <20200120091729.16256-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200120091729.16256-1-m.felsch@pengutronix.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2020 at 10:17:29AM +0100, Marco Felsch wrote: > 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 guarantee > 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 does > because the watchdog gets disabled anyway and a (re)start reset the resets > watchdog counter too. > > Signed-off-by: Marco Felsch Reviewed-by: Guenter Roeck > --- > 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,