From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756879AbbJASFh (ORCPT ); Thu, 1 Oct 2015 14:05:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35053 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbbJASFg (ORCPT ); Thu, 1 Oct 2015 14:05:36 -0400 Date: Thu, 1 Oct 2015 11:05:34 -0700 From: Stephen Boyd To: Paul Osmialowski Cc: Michael Turquette , Russell King , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Osmialowski Subject: Re: [PATCH v3] clk: add devm_of_clk_get() and devm_of_clk_get_by_name() functions Message-ID: <20151001180534.GH19319@codeaurora.org> References: <1443686626-26450-1-git-send-email-newchief@king.net.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443686626-26450-1-git-send-email-newchief@king.net.pl> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01, Paul Osmialowski wrote: > From: Paul Osmialowski > > These two functions are added to ease management of clocks obtained > from OF device nodes. > > They are particulary useful while iterating over DT subnodes using e.g. > for_each_child_of_node(dev->of_node, child) in order do get resources > (i.e. clocks) for subdevices defined by these DT subnodes. > > For example: > > some_device { > compatible = "something" > #address-cells = <1>; > #size-cells = <1>; > ranges; > > subdevice1: some_subdevice@some_address1 { > reg = <0xsome_address1 0xsome_size> > clocks = <&some_clock1> > } > > subdevice2: some_subdevice@some_address2 { > reg = <0xsome_address2 0xsome_size> > clocks = <&some_clock2> > } > } > > Normally, I'd have to use of_clk_get() on each subdevice node and then > worry about proper resource release myself. > > IMHO using devres infrastructure for this is far better. This patch adds > missing functions needed to do it a better way. > > Signed-off-by: Paul Osmialowski It sounds like your pinctrl binding will be rewritten so that there isn't a need for this patch. Consider this patch rejected. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project