Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645113

Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock with CLK_OF_DECLARE_DRIVER

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock with CLK_OF_DECLARE_DRIVER
Date 2017-05-19 04:00 +0200
Message-ID <tIFmV-3k7-3@gated-at.bofh.it> (permalink)
References <tIiTn-2In-5@gated-at.bofh.it> <tIiTn-2In-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock with CLK_OF_DECLARE_DRIVER Leo Yan <leo.yan@linaro.org> - 2017-05-18 04:00 +0200
  Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock  with CLK_OF_DECLARE_DRIVER Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-05-18 11:40 +0200
    Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock  with CLK_OF_DECLARE_DRIVER Leo Yan <leo.yan@linaro.org> - 2017-05-18 11:50 +0200
  Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock  with CLK_OF_DECLARE_DRIVER Stephen Boyd <sboyd@codeaurora.org> - 2017-05-19 04:00 +0200
    Re: [PATCH v2 1/2] clk: Hi3660: change to register crgctrl clock  with CLK_OF_DECLARE_DRIVER Leo Yan <leo.yan@linaro.org> - 2017-05-19 04:10 +0200

csiph-web