mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <dinguyen@opensource.altera.com>
To: <sboyd@codeaurora.org>, <mturquette@linaro.org>
Cc: <dinh.linux@gmail.com>, <geert@linux-m68k.org>,
	<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Dinh Nguyen <dinguyen@opensource.altera.com>
Subject: [RFC/PATCHv2 0/2]  clk: of: add helper function to fill parent clock array
Date: Thu, 4 Jun 2015 14:12:31 -0500	[thread overview]
Message-ID: <1433445153-25320-1-git-send-email-dinguyen@opensource.altera.com> (raw)

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 the following 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.

v2: use unsigned int for 'size'

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


             reply	other threads:[~2015-06-04 19:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 19:12 dinguyen [this message]
2015-06-04 19:12 ` [RFC/PATCHv2 1/2] clk: of: helper for filling parent clock array and return num of parents dinguyen
2015-06-04 21:24   ` Stephen Boyd
2015-06-05 15:35     ` Dinh Nguyen
2015-06-04 19:12 ` [RFC/PATCHv2 2/2] clk: socfpga: make use of of_clk_parent_fill helper function dinguyen
2015-06-04 21:25   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433445153-25320-1-git-send-email-dinguyen@opensource.altera.com \
    --to=dinguyen@opensource.altera.com \
    --cc=dinh.linux@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome