linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCHv1 0/2] clk: of: add helper function to fill parent clock array
@ 2015-06-01 21:46 dinguyen
  2015-06-01 21:46 ` [RFC/PATCHv1 1/2] clk: of: helper for filling parent clock array and return num of parents dinguyen
  2015-06-01 21:46 ` [RFC/PATCHv1 2/2] clk: socfpga: make use of of_clk_parent_fill helper function dinguyen
  0 siblings, 2 replies; 4+ messages in thread
From: dinguyen @ 2015-06-01 21:46 UTC (permalink / raw)
  To: sboyd, mturquette; +Cc: dinh.linux, linux-clk, linux-kernel, Dinh Nguyen

From: Dinh Nguyen <dinguyen@opensource.altera.com>

Hi,

As suggested by Stephen Boyd, this patch adds a helper function that will fill
the parent clock array.

Since this kind of code is sprinkled all over the platform clock drivers:

for (i = 0; i < num_parents; ++i)
	parent_names[i] = of_clk_get_parent_name(np, i);

The above code can be replace by of_clk_parent_fill(). And since the logic
of the of_clk_parent_fill is to walk the clock node to find the parent, it is
easy to just return the number of parents as well.

The second patch makes use of the new helper function in the SoCFPGA platform.
If this patch is accepted, I can go through and replace the other platforms
after that.

Thanks,

Dinh Nguyen (2):
  clk: of: helper for filling parent clock array and return num of
    parents
  clk: socfpga: make use of of_clk_parent_fill helper function

 drivers/clk/clk.c              | 20 ++++++++++++++++++++
 drivers/clk/socfpga/clk-gate.c |  6 +-----
 drivers/clk/socfpga/clk-pll.c  |  7 +------
 include/linux/clk-provider.h   |  1 +
 4 files changed, 23 insertions(+), 11 deletions(-)

-- 
2.2.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-02  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 21:46 [RFC/PATCHv1 0/2] clk: of: add helper function to fill parent clock array dinguyen
2015-06-01 21:46 ` [RFC/PATCHv1 1/2] clk: of: helper for filling parent clock array and return num of parents dinguyen
2015-06-02  7:16   ` Geert Uytterhoeven
2015-06-01 21:46 ` [RFC/PATCHv1 2/2] clk: socfpga: make use of of_clk_parent_fill helper function dinguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).