Received: by 10.223.176.5 with SMTP id f5csp1206239wra; Fri, 9 Feb 2018 14:41:30 -0800 (PST) X-Google-Smtp-Source: AH8x224iWvAKHpSbuMekiDqodPovFbmO32DVT3m80u7OxCOovlsZS+DVUEuUx5mBNuzNjFLiUORK X-Received: by 10.98.71.146 with SMTP id p18mr4310169pfi.3.1518216090332; Fri, 09 Feb 2018 14:41:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518216090; cv=none; d=google.com; s=arc-20160816; b=zssAgCINkt7kNKGLiQr7joLiUTo3aFxNmlUjjF94z2pdTiIs06q7LXJfBjpwN7zhZj NnZ5Y+lYwsUXlymgYzjm+sgeGM8uGHpvhAoFeAEsoTQqHmcuBRzPrXTWZP7JCho1RxUH HmaiWyY9VY4GPagguk6IyxBIoIbsoA9Yf1uMlZL4KOr5hCKU64BkbggSRYGaZuVAhTmz AtxH0daNiWidaQzZvcl9QWSEwt358BmRuQTMSYsE8C1xZG4vFp454586Q6nkqgH2fyhw 4n1YwhGoNpaUMhcdliWyZxjCpm1f+8AuzizqcP/aqca/zrudMZaf21F4bGLDRVjp/P+I 2GGg== 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:arc-authentication-results; bh=5IKbCniNKvZlBTK+9/WR58I/XPzmUNEq4S04jHBvm20=; b=en0SbBrg4Y0IswI6Sno/CHNyzAzbCnS2m8Wj/ulrdI9V03FmMtFf8uMXdfQxUS0znh 4VnHYmWsxmQJWT94B4Aq+zHLKt1tYfl998LfzjlWuUjyReNEE58vB9NVHUoNmjVGzMlO 4BGxPk+WBlAs9GI5QCEC91/YKmcrfVvWP11awraTIk/y4vQQEzlwtk3Bf3MUMEEQY1sD BBtJ4ZFNujd0m3hg7dmIGiWJ0fZfb4FkbUHsejh7GHlFaJYd/dfN2e2IbttW0uLu3o/l QjTEeJQEe1RPfPImPSXQZB12aiwPVappC89+wIqY9iBf4Pg2ExHZ/LrBUsOetgy8Qv4G 6ihg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VvyWlojb; 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 t9si345007pgq.500.2018.02.09.14.41.16; Fri, 09 Feb 2018 14:41:30 -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=VvyWlojb; 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 S1753196AbeBIWk3 (ORCPT + 99 others); Fri, 9 Feb 2018 17:40:29 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46436 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753041AbeBIWk1 (ORCPT ); Fri, 9 Feb 2018 17:40:27 -0500 Received: by mail-pl0-f66.google.com with SMTP id 36so2101614ple.13; Fri, 09 Feb 2018 14:40:27 -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=5IKbCniNKvZlBTK+9/WR58I/XPzmUNEq4S04jHBvm20=; b=VvyWlojbSdiouwuL6HwHJZ9Jl8Ka93N6EoB2fOu/n7KQ+OJE55XY3dpUCVGo6sSLPj WcjynZeSHAnQ/YJwcPT4wByYNywmP0wHmc8FH/8bzlWz88z+Dgqjfm+60rhOvNFoEleK MuC+XBcfipLq1o1ea70LZ4yotPmK30nHbVVcKUZJ1hCdTiDwzYZ6cXuws/+BGhmvLgD+ lihULvFndpoI4aWpUvtXe1uw5YbGqz0VwWUKztWe9k5qf9s8dWnUqdOQ8ixgpS82G4fq M+u/GS5fIWEWRr4c6phFvmo2Ay9VBzGlBs7gjiR2es13IhC3C1akcJzdcc+jenqZhDkd 5FnQ== 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=5IKbCniNKvZlBTK+9/WR58I/XPzmUNEq4S04jHBvm20=; b=YW9DBBpnGKQGxbbtcKmnE9jkX/qfP1gYe3kB3oV853m7HePtrPEUfmjZj1enTBIvxa fqM7yE+1AedsuEkXevbNlOiKXMlG7/hr4n1FoFS8GmTbxs/kiQH6qsbaUiLz/QsRfzIy DEhbHL9Q2wSoekMAUl6zZ0F3EqP7gsL8pB2tGDIyU7ukGIhKtEiL0I24in7tK6TWlkIc 6WJolHXJX/c6GOksBENmirvD0gvNwwjHYFsPuYAzCf0hyTsyTe/o0U8Xq+u/Rh8AQYJ6 BbQ4ISlFsLudpKgATH7Im5BtwUR9xDdigSm4DW/hroz8xnw9AoTQ8oURpTxcVIFvPlBO Lpew== X-Gm-Message-State: APf1xPDuhQe1IoIQ95yWYOBDGaKNWrhBlc/nqyPvYFVCWMwbfuitZAJW qgK2O9r6Q8Mr6GxsNEy0UZA= X-Received: by 2002:a17:902:7789:: with SMTP id o9-v6mr3888339pll.84.1518216026829; Fri, 09 Feb 2018 14:40:26 -0800 (PST) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id m83sm8914014pfk.107.2018.02.09.14.40.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 14:40:26 -0800 (PST) Date: Fri, 9 Feb 2018 14:40:25 -0800 From: Guenter Roeck To: Marcus Folkesson Cc: Wim Van Sebroeck , Rob Herring , Mark Rutland , Carlo Caione , Kevin Hilman , Matthias Brugger , Barry Song , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Vladimir Zapolskiy , Sylvain Lemieux , Nicolas Ferre , Alexandre Belloni , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree Message-ID: <20180209224025.GD19627@roeck-us.net> References: <20180209192724.1227-1-marcus.folkesson@gmail.com> <20180209192724.1227-4-marcus.folkesson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180209192724.1227-4-marcus.folkesson@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 09, 2018 at 08:27:20PM +0100, Marcus Folkesson wrote: > watchdog_init_timeout() will allways pick timeout_param since it > defaults to a valid timeout. > > By following best practice described in > Documentation/watchdog/watchdog-kernel-api.txt, it also > let us to set timout-sec property in devicetree. > > Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck > --- > Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++ > drivers/watchdog/sirfsoc_wdt.c | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt > index 9cbc76c89b2b..0dce5e3100b4 100644 > --- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt > +++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt > @@ -5,10 +5,14 @@ Required properties: > - reg: Address range of tick timer/WDT register set > - interrupts: interrupt number to the cpu > > +Optional properties: > +- timeout-sec : Contains the watchdog timeout in seconds > + > Example: > > timer@b0020000 { > compatible = "sirf,prima2-tick"; > reg = <0xb0020000 0x1000>; > interrupts = <0>; > + timeout-sec = <30>; > }; > diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c > index 4eea351e09b0..ac0c9d2c4aee 100644 > --- a/drivers/watchdog/sirfsoc_wdt.c > +++ b/drivers/watchdog/sirfsoc_wdt.c > @@ -29,7 +29,7 @@ > #define SIRFSOC_WDT_MAX_TIMEOUT (10 * 60) /* 10 mins */ > #define SIRFSOC_WDT_DEFAULT_TIMEOUT 30 /* 30 secs */ > > -static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT; > +static unsigned int timeout; > static bool nowayout = WATCHDOG_NOWAYOUT; > > module_param(timeout, uint, 0); > -- > 2.15.1 >