From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbcLIUbo (ORCPT ); Fri, 9 Dec 2016 15:31:44 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:36304 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977AbcLIUbk (ORCPT ); Fri, 9 Dec 2016 15:31:40 -0500 Date: Fri, 9 Dec 2016 20:31:27 +0000 From: Russell King - ARM Linux To: Kuninori Morimoto Cc: Stephen Boyd , Rob Herring , Linux-ALSA , Linux-DT , Michael Turquette , Linux-Kernel , Mark Brown , linux-clk@vger.kernel.org, Linux-ARM Subject: Re: [PATCH 1/3] clkdev: add devm_get_clk_from_child() Message-ID: <20161209203127.GR14217@n2100.armlinux.org.uk> References: <874m2jvtmw.wl%kuninori.morimoto.gx@renesas.com> <8737i3vtl7.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8737i3vtl7.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2016 at 05:23:20AM +0000, Kuninori Morimoto wrote: > > From: Kuninori Morimoto > > Some driver is using this type of DT bindings for clock (more detail, > see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt). > > sound_soc { > ... > cpu { > clocks = <&xxx>; > ... > }; > codec { > clocks = <&xxx>; > ... > }; > }; > > Current driver in this case uses of_clk_get() for each node, but there > is no devm_of_clk_get() today. > OTOH, the problem of having devm_of_clk_get() is that it encourages the > use of of_clk_get() when clk_get() is more desirable. > > Thus, this patch adds new devm_get_clk_from_chile() which explicitly > reads as get a clock from a child node of this device. > By this function, we can also use this type of DT bindings > > sound_soc { > clocks = <&xxx>, <&xxx>; > clock-names = "cpu", "codec"; > ... > cpu { > ... > }; > codec { > ... > }; > }; > > Signed-off-by: Kuninori Morimoto This looks lots better, thanks. Acked-by: Russell King -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.