Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4658278imm; Fri, 18 May 2018 08:36:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpGdJPb4T/y6hI6K7HomhjmGBr5WZXnV6+xQbgiAkLk+iSEmyEYvC2oJ+5gwitBIxR9OYdF X-Received: by 2002:a63:a102:: with SMTP id b2-v6mr7803189pgf.75.1526657797940; Fri, 18 May 2018 08:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526657797; cv=none; d=google.com; s=arc-20160816; b=Nc/y3VwwQSvIjXq2jRKvOu5evjpq9Y34CSe9fRIllwlneu4TG7uL/YFjwLm54AFwL2 JVQdzh/lOYCcd9fwBAxjlwNT0bgjI9zW7U+5MKPntsztdUI5+HblSuGSGqFtUnmsgh2h +Mqg4GeDAiPsqKXm7Lz+9p9LJ52/fmq7Nv0qNCD6HTkgxULvODZezBKb5ImEnHIXvXYo uFZIDDz66jr1nFYFil1PwpVq/xzrCt8LbzmcKx5Yh4UuPjVv3Ghw+naH3q6jo2BLV7iY 6n2dx20ONHXYB7xtmmdN60mG6ttnMKri6akgBXJEKbD++iVkSXEi4jCD/sm5japOXqDl VlkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=AYOTWjiQk1ZbPayIFqOOzitjibzDaCZZnhEJ94Fdb90=; b=VfhXXF0LuADGYGbdbis+JP3kD5lVwiq71u5uTG6b+vRcgkI0Q5gUMfjX6ISrpyeA3R UipefOwZVgYii22Km9ixideg1i+b6hCD9cb/XgQcc/nHp3bWehMCCCR6N2KH3RAUmxK8 jWv5FAV7djMHZtWzDSwrSqeLv5eOpOI9RoNwPJnrf36HL4Z+sNSz3aqQLHpqacvI1c9+ 37MVPVYEVNs2rT/UqRd9D1jgIKOvmTTQDdFigd/rD17s5l33eFAb4Z0GziWrP1fVpE64 H665lI4G3diNYIYYJoT52hSIxZXUcvHj8Mq99WicEM1HEZpBgaPWyYXjdM+JXeRnGMKB KWhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=WlhRz1m4; 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 u2-v6si7970661plm.379.2018.05.18.08.36.23; Fri, 18 May 2018 08:36:37 -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=@lechnology.com header.s=default header.b=WlhRz1m4; 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 S1752200AbeERPgF (ORCPT + 99 others); Fri, 18 May 2018 11:36:05 -0400 Received: from vern.gendns.com ([206.190.152.46]:54186 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbeERPf6 (ORCPT ); Fri, 18 May 2018 11:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To: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=AYOTWjiQk1ZbPayIFqOOzitjibzDaCZZnhEJ94Fdb90=; b=WlhRz1m47YGKlBDgsSGw4DSh5h SoO6ZquZxu+VH1XFk9f46y9B7i0UsZ4v8p4fTZE/ITzZEE9xa7IGk5u0yo+E9Qdtn0MZbGQJxVj8S SccieKcU1pI+FppNpbFR/qSnGeX4C++fD5jmOm2SeC0jipPuVCQcvcXVS6RmakOkU27nT+LirnSRB zgcEhCwNTpIHZ5Ya0qQcCu7E1aZfRizq88ViB6l8saMhYZ+o25Vaoz7Exs5wpquo98S/sutlc/lfJ wffgSjpbUrNHXLowCi3VlcV6wLAgqylrVA1ckdto1Efj6SFFgGCS1HVyvB94Q5u8qybBm7QWwGUkE voa6g7Ew==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:34178 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1fJhQC-00FeMX-GB; Fri, 18 May 2018 11:35:56 -0400 Subject: Re: [PATCH v10 25/27] ARM: davinci: add device tree support to timer To: Sekhar Nori , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , linux-kernel@vger.kernel.org References: <20180509172606.29387-1-david@lechnology.com> <20180509172606.29387-26-david@lechnology.com> <8fa98514-7651-58cb-595e-6c7f713540b8@ti.com> <1162de58-00bc-fdfa-eef1-48a094834ac3@lechnology.com> From: David Lechner Message-ID: <9bc3fb8f-ca03-9cfd-1e9d-51f8c9347da7@lechnology.com> Date: Fri, 18 May 2018 10:35:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com 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 05/18/2018 01:05 AM, Sekhar Nori wrote: > On Thursday 17 May 2018 08:39 PM, David Lechner wrote: >> On 05/17/2018 09:35 AM, Sekhar Nori wrote: >>> Hi David, >>> >>> On Wednesday 09 May 2018 10:56 PM, David Lechner wrote: >>>> This adds device tree support to the davinci timer so that when clocks >>>> are moved to device tree, the timer will still work. >>>> >>>> Signed-off-by: David Lechner >>>> --- >>> >>>> +static int __init of_davinci_timer_init(struct device_node *np) >>>> +{ >>>> +    struct clk *clk; >>>> + >>>> +    clk = of_clk_get(np, 0); >>>> +    if (IS_ERR(clk)) { >>>> +        struct of_phandle_args clkspec; >>>> + >>>> +        /* >>>> +         * Fall back to using ref_clk if the actual clock is not >>>> +         * available. There will be problems later if the real clock >>>> +         * source is disabled. >>>> +         */ >>>> + >>>> +        pr_warn("%s: falling back to ref_clk\n", __func__); >>>> + >>>> +        clkspec.np = of_find_node_by_name(NULL, "ref_clk"); >>>> +        if (IS_ERR(clkspec.np)) { >>>> +            pr_err("%s: No clock available for timer!\n", __func__); >>>> +            return PTR_ERR(clkspec.np); >>>> +        } >>>> +        clk = of_clk_get_from_provider(&clkspec); >>>> +        of_node_put(clkspec.np); >>>> +    } >>> >>> Do we need this error path now? >>> >>> Thanks, >>> Sekhar >>> >> >> No, not really. > > Then lets just print an error and return the error number. > OK. FYI, timer_probe() prints the error if we return and error, so I will just return the error.