From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34696FC6198 for ; Fri, 8 Nov 2019 21:14:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0619521924 for ; Fri, 8 Nov 2019 21:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573247657; bh=1E2P2eaR5D6WMUT1+wIsyz3QIoOZz8hZxKKalhcbczw=; h=In-Reply-To:References:From:To:Cc:Subject:Date:List-ID:From; b=wpF71uwfRPADO7TsP/mX/+OgcAge2lL9O/TEQ3Acdi4zL8sVbNWbkOuCw83SKE5Cv 7zj0R6fLshSmg2r4o9xmhaLTNbJcSuhJ9N/6DFY8nYArlRUtc9CwbxsmZh310aEeIF 0s7UjJEeQBU/Z6CUlNflaLmYc0WRNMr78yIqKC1o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732685AbfKHVOL (ORCPT ); Fri, 8 Nov 2019 16:14:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:56286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732382AbfKHVOK (ORCPT ); Fri, 8 Nov 2019 16:14:10 -0500 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0411720869; Fri, 8 Nov 2019 21:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573247650; bh=1E2P2eaR5D6WMUT1+wIsyz3QIoOZz8hZxKKalhcbczw=; h=In-Reply-To:References:From:To:Cc:Subject:Date:From; b=DVCgyzxiqBzEZbUqgcL/9xLt8kgLmS2d8qo10M/zc/qqUqVWE4FLM6G1VKk0HFDcD lsG7ddvHm09qdBdI6gUEYcheQjxOFagAYZVnUPBTfmFVq97FkNyhgwz+je/BX1ttlb 0s8ni7iKvcqvuuI8fKYCrIK4hQx9MFv466YM7w6k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20191014102308.27441-1-tdas@codeaurora.org> <20191029175941.GA27773@google.com> <20191031174149.GD27773@google.com> <20191107210606.E536F21D79@mail.kernel.org> <20191108063543.0262921882@mail.kernel.org> <20191108184207.334DD21848@mail.kernel.org> From: Stephen Boyd To: Rob Clark Cc: Matthias Kaehlcke , Taniya Das , Michael Turquette , David Brown , Rajendra Nayak , linux-arm-msm , linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, LKML , devicetree@vger.kernel.org, robh@kernel.org, Rob Herring , Jordan Crouse , Jeykumar Sankaran , Sean Paul Subject: Re: [PATCH v4 5/5] clk: qcom: Add Global Clock controller (GCC) driver for SC7180 User-Agent: alot/0.8.1 Date: Fri, 08 Nov 2019 13:14:09 -0800 Message-Id: <20191108211410.0411720869@mail.kernel.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Quoting Rob Clark (2019-11-08 11:40:53) > On Fri, Nov 8, 2019 at 10:42 AM Stephen Boyd wrote: > > > > So the scenario is DT describes the clk > > > > dpu_node { > > clocks =3D <&cc AHB_CLK>; > > clock-names =3D "iface"; > > } > > > > but the &cc node has a driver that doesn't probe? > > > > I believe in this scenario we return -EPROBE_DEFER because we assume we > > should wait for the clk driver to probe and provide the iface clk. See > > of_clk_get_hw_from_clkspec() and how it looks through a list of clk > > providers and tries to match the &cc phandle to some provider. > > > > Once the driver probes, the match will happen and we'll be able to look > > up the clk in the provider with __of_clk_get_hw_from_provider(). If > > the clk provider decides that there isn't a clk object, it will return > > NULL and then eventually clk_hw_create_clk() will turn the NULL return > > value into a NULL pointer to return from clk_get(). > > >=20 > ok, that was the scenario I was worried about (since unclk'd register > access tends to be insta-reboot and hard to debug).. so I think it > should be ok to make dpu just ignore NULL clks. >=20 > From a quick look, I think something like the attached (untested). > (Sorry, I'd just paste it inline but gmail somehow eats all the > whitespace when I do that :-/) Cool. Looks good to me.