From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12CF9C31E4B for ; Fri, 14 Jun 2019 18:08:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC90E2064A for ; Fri, 14 Jun 2019 18:08:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WlO1CU3s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC90E2064A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D7JizV+VEaRkvNui7pl/ocyXtqjrWMZFvnpkd8OxoOU=; b=WlO1CU3scOQGg1 PZRaeT/c1ZO+UAJspqot4JLTx7G8ggkQEMyUo1v4wXBNc9DlD9WBeP/UeVPwo5yxIRQYwV21uC9fF xPtaEQd1QNCzXFU3dU7HG3dorec2VhRt623k/Lwz1NiaQSaiMeMItI46/U4tzS+j44gMnHKRsfApp nL5l48vXnTtm315SPPvL+4rcSa4V9MTWZMDjf/R/37RFMcTuivyawm3c4Rmrl50l3uOcxjAALzQlN 1p+KxTh/xytNeFugfZ2jnGVpYW6Lc78b5ITw97jNN0ELZ3XygEzQ+7/iM0+yR2KXB7VmcGhAX+yeJ tVMwVXtfgvwR4jowSflg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbqd7-0007Dd-Dr; Fri, 14 Jun 2019 18:08:49 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbqd3-0007Cb-JE for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 18:08:47 +0000 X-Originating-IP: 37.205.120.66 Received: from localhost (unknown [37.205.120.66]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5A6AF40003; Fri, 14 Jun 2019 18:08:29 +0000 (UTC) Date: Fri, 14 Jun 2019 20:08:26 +0200 From: Alexandre Belloni To: Ken Sloat Subject: Re: [PATCH v2 1/1] watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend Message-ID: <20190614180826.GD3369@piout.net> References: <20190614125310.29458-1-ksloat@aampglobal.com> <20190614164609.GA29814@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190614_110845_794413_442BB52D X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ludovic.desroches@microchip.com" , Guenter Roeck , "wim@linux-watchdog.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 14/06/2019 17:53:01+0000, Ken Sloat wrote: > > The call to sama5d4_wdt_init() above now explicitly stops the watchdog > > even if we want to (re)start it. I think this would be better handled with an > > else case here > > > > else > > sama5d4_wdt_stop(&wdt->wdd); > > > > So we completely remove the sama5d4_wdt_init() call then correct? > > To leave the code as it behaves today with the addition > of wdt stop/start, shouldn't we call init in the else instead? > > if (watchdog_active(&wdt->wdd)) > sama5d4_wdt_start(&wdt->wdd); > else > sama5d4_wdt_init(); > > I guess I don't really understand the purpose of having the init statement in resume > in the first place. I agree, calling this first does end up essentially resetting the wdt > it will start again if it was running before, but the count will be reset. > There is a nice comment explaining why ;) -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel