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


Groups > linux.kernel > #1514189

Re: [PATCH v3 10/11] clk: Add clk_hw_get_clk() helper API to be used by clk providers

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 10/11] clk: Add clk_hw_get_clk() helper API to be used by clk providers
Date 2016-11-02 23:30 +0100
Message-ID <szccG-3OO-33@gated-at.bofh.it> (permalink)
References <smF2N-1Ft-5@gated-at.bofh.it> <smF2O-1Ft-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/29, Rajendra Nayak wrote:
> Add a helper API that will allow clk providers to turn their clk_hw
> structures into struct clk pointer.
> 

Did I suggest this?

> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
> ---
>  drivers/clk/clk.c            | 6 ++++++
>  include/linux/clk-provider.h | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 820a939..a084132 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -186,6 +186,12 @@ const char *clk_hw_get_name(const struct clk_hw *hw)
>  }
>  EXPORT_SYMBOL_GPL(clk_hw_get_name);
>  
> +struct clk *clk_hw_get_clk(const struct clk_hw *hw)
> +{
> +	return hw->clk;

I'd prefer we actually went through all the work and actually
allocated another clk structure here. We can add another string
or two for the dev_id and con_id too for debug/accouting
purposes.

The hw->clk is sort of a remnant of the clk_core introduction. I
can't recall the exact plan (i.e. I should write it down
somewhere once I do) but I think we want to get rid of hw->clk
and have everyone use clk_hw_get_clk() instead. Then for
traversals from the clk_hw pointer to a clk pointer are very
clear.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


Thread

Re: [PATCH v3 10/11] clk: Add clk_hw_get_clk() helper API to be used  by clk providers Stephen Boyd <sboyd@codeaurora.org> - 2016-11-02 23:30 +0100
  Re: [PATCH v3 10/11] clk: Add clk_hw_get_clk() helper API to be used  by clk providers Rajendra Nayak <rnayak@codeaurora.org> - 2016-11-03 09:40 +0100
    Re: [PATCH v3 10/11] clk: Add clk_hw_get_clk() helper API to be used  by clk providers Stephen Boyd <sboyd@codeaurora.org> - 2016-11-03 20:50 +0100

csiph-web