Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp56325imm; Tue, 22 May 2018 13:57:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpUZNmJmnoCf3u7YUguSxLY4/yjSKJ2a56dtvZOmcmwb7nACdBqoHmlDZgi3fo0dnopXJXD X-Received: by 2002:a62:ae13:: with SMTP id q19-v6mr35789pff.155.1527022673250; Tue, 22 May 2018 13:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527022673; cv=none; d=google.com; s=arc-20160816; b=bQnWBpuBgM0dYWwph8mwO/QHQPSRoH59aKnOXNqPjWzj5G+impKT06XWJev2qV8hv9 YRTLq7xUXTAKTTWcMsWMJn5uoPMfoAu5/aY2a193yNIsB0H6eJm1O0v938J1Nb4z+yFz BqBI2iwswwJt+aQivApgRMgLutvm46pnaXt98sLC+6YVyWPsIEwCJVmtbHRkeIkf8okj ppr+8eBV1KDzNVa6STg1XEIFdXSuuvM3J9G8iMoSDWjh3bxtoHiTDIeYeERscKGf5yvN SoQEHHP683nYxcqASz5wbE5cqSdUF3nS7t6xYvkuQfWPSa7/y3L7UztVpx/E6FW/ng8Z Ux2Q== 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=+SBm+KXiOQ3JWcc7lrGmMAtAodJHMsvZ6nFy9M1RNbs=; b=v8T9gE2PF4q/u9hlmDj3syzwOpH1R5QX3RQtRtbRfZMdzUT0v983cwMgy2jxHk40jO +A5ZPpItxl+L3VrbJNuRqsf59PsghMQNGIZp2uRfLv8+IB1opz6+RAmh9C7ISyg4JgNz Xi0ob85Pa07cr4qRUibCe6CfGLBYM1RGgNf9khauh3TheuvcMSzJ2Bsfj7AD1xQo4SZ5 ra3CUBfbqEq2mv7OMXfw3D5A+RI6lOARGt6mkbt2Mlodgl6xjduJsgRGHIg2NuYIgXIw 9+TGb8l1XA8yzwfO1m1kt4FkcKwA4XCu9QMAbSrAewejDaKdhQftJ/VUZSXquL/Nm8V6 DfWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=1awNVACk; 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 x6-v6si5898469pgb.35.2018.05.22.13.57.38; Tue, 22 May 2018 13:57:53 -0700 (PDT) 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=@roeck-us.net header.s=default header.b=1awNVACk; 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 S1753047AbeEVU5b (ORCPT + 99 others); Tue, 22 May 2018 16:57:31 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:40411 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631AbeEVU53 (ORCPT ); Tue, 22 May 2018 16:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+SBm+KXiOQ3JWcc7lrGmMAtAodJHMsvZ6nFy9M1RNbs=; b=1awNVACkYkI1chcRcyxiYp1S5R f5Q9yHi78d7m4LFLjVFoj23j01W2XT3AYo2iNZX0QHU8qb7mRza8KNM7dvxnWQLrO8DSu00FPXG6r lQV1AkU6jNC/6lAtJUiGmsVWrjAJPakdHNS+IWSfw4km0JAfN78vChLhGtDpKen33cOsDDbXDYq9j rEaNTAHIm+uDpoj7K3slrc77TRSNmz+gPAPAzMmD17xkYP/ACMzIqB3LKrNFLPAL2RUt7mY/o2VF0 eLv03btFC+Hk/1uOTXYfsJuGTTSJNRIBQziyTU9qmF2O1bpipu25iMchszWUS920/BlrnNXDwTQd3 cArZGMbQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:37976 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.89) (envelope-from ) id 1fLELY-000EfI-B8; Tue, 22 May 2018 20:57:28 +0000 Date: Tue, 22 May 2018 13:57:27 -0700 From: Guenter Roeck To: Ray Jui Cc: Wim Van Sebroeck , Rob Herring , Mark Rutland , Frank Rowand , Catalin Marinas , Will Deacon , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH 2/5] watchdog: sp805: add 'timeout-sec' DT property support Message-ID: <20180522205727.GC16363@roeck-us.net> References: <1527014840-21236-1-git-send-email-ray.jui@broadcom.com> <1527014840-21236-3-git-send-email-ray.jui@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527014840-21236-3-git-send-email-ray.jui@broadcom.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 11:47:17AM -0700, Ray Jui wrote: > Add support for optional devicetree property 'timeout-sec'. > 'timeout-sec' is used in the driver if specified in devicetree. > Otherwise, fall back to driver default, i.e., 60 seconds > > Signed-off-by: Ray Jui > Reviewed-by: Scott Branden Reviewed-by: Guenter Roeck > --- > drivers/watchdog/sp805_wdt.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c > index 03805bc..1484609 100644 > --- a/drivers/watchdog/sp805_wdt.c > +++ b/drivers/watchdog/sp805_wdt.c > @@ -230,7 +230,14 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id) > spin_lock_init(&wdt->lock); > watchdog_set_nowayout(&wdt->wdd, nowayout); > watchdog_set_drvdata(&wdt->wdd, wdt); > - wdt_setload(&wdt->wdd, DEFAULT_TIMEOUT); > + > + /* > + * If 'timeout-sec' devicetree property is specified, use that. > + * Otherwise, use DEFAULT_TIMEOUT > + */ > + wdt->wdd.timeout = DEFAULT_TIMEOUT; > + watchdog_init_timeout(&wdt->wdd, 0, &adev->dev); > + wdt_setload(&wdt->wdd, wdt->wdd.timeout); > > ret = watchdog_register_device(&wdt->wdd); > if (ret) { > -- > 2.1.4 >