From patchwork Tue Oct 9 12:04:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 1569771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 11602DFFAD for ; Tue, 9 Oct 2012 12:06:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TLYYG-0001IA-5d; Tue, 09 Oct 2012 12:04:44 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TLYXq-00018h-Fk for linux-arm-kernel@lists.infradead.org; Tue, 09 Oct 2012 12:04:19 +0000 Received: by mail-ee0-f49.google.com with SMTP id c1so3282973eek.36 for ; Tue, 09 Oct 2012 05:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ZPl/r64JbFxuHrol//f/Fta4dQU9UaPaCh6phqGsvEs=; b=LdzsD/+1PQcuCNlvrIFEp+zsNv2GBdRq8HhCUATCcR/Se8tUd6ZcH029UvDLKzf+ql TvssbSIwCARnhGBJYS8X3ZY/uThJ1XEe3SINkFfdi/hVyZcwrKug6d9LPgbSeQ4ZNBti Sq9gRCfM58vtuWZc2Lh2lJ+xfdgYUwmFuFVMW2oPgkSLS2/ynB5OStJhkR7snUlnfSAb jF4P2CgdmhyWuzoA8ZfqXvXqrfyja6LPGax5MNGAPvv5y1ayYqfX8X+dLfjy+3izrNHk 3XnwwoNUekDfQHarqUeRpZrA0RHiDQlBZAEqqln/xPDUWR6L8iLNvWS1RHTDGgDfdLLv op2w== Received: by 10.14.225.73 with SMTP id y49mr11312360eep.25.1349784257271; Tue, 09 Oct 2012 05:04:17 -0700 (PDT) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPS id i41sm33975995eem.7.2012.10.09.05.04.15 (version=SSLv3 cipher=OTHER); Tue, 09 Oct 2012 05:04:16 -0700 (PDT) From: Fabio Porcedda To: Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Ferre , Jean-Christophe PLAGNIOL-VILLARD , Andrew Victor , Jason Cooper , Andrew Lunn , Ben Dooks , Kukjin Kim Subject: [PATCH v4 1/8] dt: add helper inline for retrieving timeout-sec property Date: Tue, 9 Oct 2012 14:04:04 +0200 Message-Id: <1349784251-28261-2-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: <1349784251-28261-1-git-send-email-fabio.porcedda@gmail.com> References: <1349784251-28261-1-git-send-email-fabio.porcedda@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (fabio.porcedda[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Grant Likely , devicetree-discuss@lists.ozlabs.org, Rob Herring X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The first user of this function is the watchdog framework. Signed-off-by: Fabio Porcedda Cc: Grant Likely Cc: Rob Herring --- include/linux/of.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/of.h b/include/linux/of.h index 72843b7..5870818 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -470,4 +470,15 @@ static inline int of_property_read_u32(const struct device_node *np, return of_property_read_u32_array(np, propname, out_value, 1); } +/** + * of_get_timeout_sec() - Helper to read the timeout_sec property + * @np: device node from which the property value is to be read. + * @timeout: adress of the output value + */ +static inline int of_get_timeout_sec(const struct device_node *np, + u32 *timeout) +{ + return of_property_read_u32(np, "timeout-sec", timeout); +} + #endif /* _LINUX_OF_H */