Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933399AbcCIQ6G (ORCPT ); Wed, 9 Mar 2016 11:58:06 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:19966 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbcCIQ57 (ORCPT ); Wed, 9 Mar 2016 11:57:59 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 09 Mar 2016 08:57:24 -0800 Subject: Re: [PATCH V2] PM / clk: Add support for obtaining clocks from device-tree To: "Rafael J. Wysocki" References: <1457529213-2581-1-git-send-email-jonathanh@nvidia.com> CC: "Rafael J. Wysocki" , Geert Uytterhoeven , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , From: Jon Hunter Message-ID: <56E05612.702@nvidia.com> Date: Wed, 9 Mar 2016 16:57:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.159] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1333 Lines: 33 On 09/03/16 14:04, Rafael J. Wysocki wrote: > On Wed, Mar 9, 2016 at 2:13 PM, Jon Hunter wrote: >> The PM clocks framework requires clients to pass either a con-id or a >> valid clk pointer in order to add a clock to a device. Add a new >> function of_pm_clk_add_clks() to allows device clocks to be retrieved >> from device-tree and populated for a given device. Note that >> of_clk_get_from_provider() is not defined if CONFIG_OF and >> CONFIG_COMMON_CLK are not selected. Therefore, make of_pm_clk_add_clks() >> dependent on these options. >> >> An optional function pointer may be passed to of_pm_clk_add_clks() that >> can be used to filter the clocks that are added for a device when >> calling of_pm_clk_add_clks(). >> >> In order to handle errors encountered when adding clocks from >> device-tree, add a function pm_clk_remove_clk() to remove any clocks >> (using a pointer to the clk structure) that have been added >> successfully before the error occurred. >> >> Signed-off-by: Jon Hunter >> --- >> >> Changes v1-v2: >> - Added support for optional filter function as suggested by Geert U. > > I'd like to get an ACK on this from someone more familiar with the DT > stuff than I am. No problem. Is Geert's ACK sufficient or is there someone else I should add? Cheers Jon