linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] [RFC] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding
Date: Thu, 4 Jun 2015 11:14:04 -0700	[thread overview]
Message-ID: <20150604181404.GF490@codeaurora.org> (raw)
In-Reply-To: <CAMuHMdXRQbBJWLCiDgx=vRcj=MS5BAQ6gskfcMGZzW1gKa6J8g@mail.gmail.com>

On 06/04, Geert Uytterhoeven wrote:
> Hi Stephen,
> 
> On Thu, Jun 4, 2015 at 1:44 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 05/29, Geert Uytterhoeven wrote:
> >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >>  #include <linux/err.h>
> >>  #include <linux/interrupt.h>
> >>  #include <linux/irq.h>
> >> @@ -234,7 +235,7 @@ static void __init sp804_of_init(struct device_node *np)
> >>               clk1 = NULL;
> >>
> >>       /* Get the 2nd clock if the timer has 3 timer clocks */
> >> -     if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
> >> +     if (of_clk_get_parent_count(np) == 3) {
> >
> > So maybe it means if we want to expose of_clk_get_parent_count()
> > we should move it to some other header file (of_clk.h?). And then
> > maybe we should always compile said helpers if OF=y and
> > HAVE_CLK=y.
> 
> That makes sense.
> 
> Currently we have lots of of_clk_*() in <linux/clk-provider.h>, and a few
> of_clk_get*() in <inux/clk.h>.
> And the mysterious of_clk_set_defaults() in <linux/clk/clk-conf.h>.
> 
> All of_clk_get*() could be moved to a new <linux/of_clk.h>.
> 
> Alternatively, of_clk_get_parent_count() could just move to <linux/clk.h>?

Hmm... of_clk_*() functions that return a struct clk * or work
with a struct clk * should stay within clk.h. But these ones in
clk-provider.h should probably move to a new of_clk.h file:

	of_clk_get_parent_count
	of_clk_get_parent_name
	of_clk_init

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

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  9:25 [PATCH 0/5] clk: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2015-05-29  9:25 ` [PATCH 1/5] clk: at91: " Geert Uytterhoeven
2015-05-30  7:43   ` Boris Brezillon
2015-06-04 20:52   ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 2/5] clk: st: " Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 3/5] clk: ti: " Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 4/5] [RFC] clk: Provide dummy of_clk_get_parent_count() for !OF/!CCF Geert Uytterhoeven
2015-05-29  9:25 ` [PATCH 5/5] [RFC] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2015-06-03 23:44   ` Stephen Boyd
2015-06-04  7:26     ` Geert Uytterhoeven
2015-06-04 18:14       ` Stephen Boyd [this message]

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=20150604181404.GF490@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).