Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3048750ybx; Fri, 8 Nov 2019 13:15:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwjW2bSNiCleIETGVt6fCri6vSczI2I+5HOlbQJGrgjnfRDfCuJ8UG6mxctj4jvx18HWAq9 X-Received: by 2002:a17:906:a40e:: with SMTP id l14mr10811507ejz.168.1573247739023; Fri, 08 Nov 2019 13:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573247739; cv=none; d=google.com; s=arc-20160816; b=NradyuF4cALYPH1JS6KqVcyHWRrtlJ2nX24UcOZgmARy9NAmzqFAlUnqiAr9nKbMGV Z7K5PJs4ek0lE8GHeGAGViYvafbikW7cmnM6/ocCTkqu6+c1pTrTN00yW3IzCNBIhaRl cqz23gTnoOkbAE3wruQkmd/12e3JOeuw31GpeokTySL8Z20KhkpdUDf4f8C4BnOd7Jmd 5ATZ4O6lJ/X8b+6Icfx8JnJCxG+fJgUv2GpWJGU5lBX7qJbMYPolJ5GsesU5p1gZkgv0 Yd7KgKhTwE3edEOumVSPkHw8emKBFTKEwuYYxPWf9WJVQEWWGHZT13QaOScJXCJVi22z cquQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:subject:cc:to :from:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=OFWSx3JYKEfdx/NGneuIqWSB3DzmT9N0znkC9VrtR8w=; b=AqtdjtXgWrduAMTISJALIKBOBJWUTq24dRow5PYcmYdlSkQV+kx2yXqfwvaKhI1Hcd ZbS8646r+P5sRcK6S/wxch/EjZZDmajJ5GmrEPLGMdZr15lvTwbdDuUEmek5zny1Egse 0otsmwEazYZAUFUMdWyUJoV8495C1sA5Ldz8kVrkp3Cd1YXWRt3qzNdJ3DMGq1tdg91Y dSUTDGAJHKIDJxMHHOpc7KiBy7awEeumXUn1QciWr0MVqB9rqFMYIXDCLiVpEt1hXlCE 158QwTYY7F7JCFIE7VtGwKKvM8dLn3swKCQz/YSiiRBBhiGsFV2PcFnwGTPBv60sl1AO nkpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DVCgyzxi; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si4785031ejq.257.2019.11.08.13.15.15; Fri, 08 Nov 2019 13:15:39 -0800 (PST) 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=@kernel.org header.s=default header.b=DVCgyzxi; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732743AbfKHVOM (ORCPT + 99 others); Fri, 8 Nov 2019 16:14:12 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.