Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4128533imm; Thu, 17 May 2018 23:07:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrH/KfFyibKOhKekb+M84Ekf1C6grZGqfUzpROINkEMAojycQXDacpMV4HpBLVy/88kHaWD X-Received: by 2002:a62:4f0c:: with SMTP id d12-v6mr8073842pfb.220.1526623625886; Thu, 17 May 2018 23:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526623625; cv=none; d=google.com; s=arc-20160816; b=MeqNXeeqwppr9zYW5g2JWgNgcywa4GqugWvJwlX7sNx5zXhuu97K90q6RFGJRS1mrt j0QVUfOYr4jc+z8TmBdzNsKpO7+tezmXAi7Nql4U3axz+MMjg3xGa8DOVqgEbp47Blh+ rI2pYQoGHMJxiDDUoidzNrEs0Zozp6OLRzKLj6ZfheUzyLLtJLop9hhWXmV+20ztiavm aGpUPDg3kpOgtxhBdJP804c+VQuX1b6uom0KGoj6+iaGlLRHebJ+rOflwVE+ZM2T2VnS aXr+TJlKo/3vg0Tw0vhh1wTyyQfJ1uE0KDB7iv1TqC1hAsg0SisrbYcojR6nz3nmw3y8 7q4Q== 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=SRUUkmdo6obAy8H6Q/UvK9ElgONJLFcAhiSYG1Chhz8=; b=kLw69FjpCuLETXMSVGdmKCxMgMjQgFSmfwBFOy/co0ywc7d2sdQ+8nHSq4qmhji36C 4jc/y/JwgSMdwtQEfyDWUfiPHV2ougzTGPB/D5/TLq/MOvTFcXJ90sjIjz3jpJI4kabV ajDwSMeM9yTBPBf/Iuoqbg+NRZ+EFdR4RUCPD4TA4rJ2E11VTcn7r7dTUPPLCeXA4PPQ xc93hWujpX5auT1Sgs2uhhrsK1cvzVcy16wyliWbKZEa9vSo7Z9zAFlB+vmM0hKTEqVq 8yVS98/MlkUdxVPzwiYjSdZNRkb/55GdCX2/VZU+KKvzzy3YrH7B+oUywUksBdVlShvi 2mXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BVKqllII; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11-v6si5348173pgn.328.2018.05.17.23.06.44; Thu, 17 May 2018 23:07:05 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BVKqllII; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751466AbeERGGf (ORCPT + 99 others); Fri, 18 May 2018 02:06:35 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:17064 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbeERGGc (ORCPT ); Fri, 18 May 2018 02:06:32 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4I65Q0W026241; Fri, 18 May 2018 01:05:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526623526; bh=SRUUkmdo6obAy8H6Q/UvK9ElgONJLFcAhiSYG1Chhz8=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=BVKqllIIW3WevN/2fz2+p1TdArAL+NZQGniQXAATJx74GycBs4xIcD/NnmdT/vh18 kfPRAHfStNbHDfxOXAlmN9MFOv6ce9dR33fv6/DZuWoZMlMNLJm+K+vX3AgrEZHLS2 N79j1iTqMeK0gX+48sr3U8GuFYNVbmxrzdXssaMc= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4I65QCP031537; Fri, 18 May 2018 01:05:26 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 18 May 2018 01:05:26 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 18 May 2018 01:05:26 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4I65JiJ031091; Fri, 18 May 2018 01:05:20 -0500 Subject: Re: [PATCH v10 25/27] ARM: davinci: add device tree support to timer To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , 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: Sekhar Nori Message-ID: Date: Fri, 18 May 2018 11:35:18 +0530 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: <1162de58-00bc-fdfa-eef1-48a094834ac3@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Sekhar