From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755514AbdESBvn (ORCPT ); Thu, 18 May 2017 21:51:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54084 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200AbdESBvj (ORCPT ); Thu, 18 May 2017 21:51:39 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B00C860C53 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Thu, 18 May 2017 18:51:37 -0700 From: Stephen Boyd To: Leo Yan Cc: Wei Xu , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Michael Turquette , Guodong Xu , Zhong Kaihua , Chen Jun , Zhangfei Gao , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Daniel Lezcano Subject: Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock with CLK_OF_DECLARE_DRIVER Message-ID: <20170519015137.GE20170@codeaurora.org> References: <1495072247-25217-1-git-send-email-leo.yan@linaro.org> <1495072247-25217-2-git-send-email-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1495072247-25217-2-git-send-email-leo.yan@linaro.org> 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 05/18, Leo Yan wrote: > diff --git a/drivers/clk/hisilicon/clk-hi3660.c b/drivers/clk/hisilicon/clk-hi3660.c > index fd5ce7f..4e5713b 100644 > --- a/drivers/clk/hisilicon/clk-hi3660.c > +++ b/drivers/clk/hisilicon/clk-hi3660.c > @@ -547,10 +547,10 @@ static void hi3660_clk_crgctrl_init(struct device_node *np) > ARRAY_SIZE(hi3660_crgctrl_divider_clks), > clk_data); > } > +CLK_OF_DECLARE_DRIVER(hi3660_clk_crgctrl, "hisilicon,hi3660-crgctrl", > + hi3660_clk_crgctrl_init); > > static const struct of_device_id hi3660_clk_match_table[] = { > - { .compatible = "hisilicon,hi3660-crgctrl", > - .data = hi3660_clk_crgctrl_init }, I'm slightly confused. CLK_OF_DECLARE_DRIVER is for when a platform driver _and_ CLK_OF_DELARE need to "probe" the same device node. But in this patch, the compatible string is being deleted from the driver's match table. Also, are all the registered in hi3660_clk_crgctrl_init() actually needed for the timer? If only a subset, then I would expect to split the code and have the CLK_OF_DECLARE_DRIVER() path register just the clks that matter for the timer, and then leave the rest of the clks to be registered by the probe of the platform driver. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project