Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266AbbBZFyy (ORCPT ); Thu, 26 Feb 2015 00:54:54 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:59218 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbbBZFyx (ORCPT ); Thu, 26 Feb 2015 00:54:53 -0500 Date: Thu, 26 Feb 2015 06:54:06 +0100 From: Sascha Hauer To: Ray Jui Cc: Mike Turquette , Stephen Boyd , Matt Porter , Alex Elder , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Scott Branden , Dmitry Torokhov , Anatol Pomazau , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH v5 1/6] clk: add of_clk_get_parent_rate function Message-ID: <20150226055406.GB28214@pengutronix.de> References: <1423097705-22939-1-git-send-email-rjui@broadcom.com> <1423097705-22939-2-git-send-email-rjui@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423097705-22939-2-git-send-email-rjui@broadcom.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:48:13 up 133 days, 17:01, 67 users, load average: 0.00, 0.04, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 29 Hi Ray, On Wed, Feb 04, 2015 at 04:55:00PM -0800, Ray Jui wrote: > Sometimes a clock needs to know the rate of its parent before itself is > registered to the framework. An example is that a PLL may need to > initialize itself to a specific VCO frequency, before registering to the > framework. The parent rate needs to be known, for PLL multipliers and > divisors to be configured properly. > > Introduce helper function of_clk_get_parent_rate, which can be used to > obtain the parent rate of a clock, given a device node and index. I can't see how this patch helps you. First it's not guaranteed that the parent is already registered, what do you do in this case? Then the clock framework doesn't require that you initialize the PLL before registering. That can be done in the clk ops later. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/