All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Maxime Coquelin <maxime.coquelin@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Tero Kristo <t-kristo@ti.com>,
	Mike Turquette <mturquette@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	linux-clk@vger.kernel.org, kernel@stlinux.com,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [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

WARNING: multiple messages have this Message-ID (diff)
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: 26+ 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 ` Geert Uytterhoeven
2015-05-29  9:25 ` [PATCH 1/5] clk: at91: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-05-30  7:43   ` Boris Brezillon
2015-05-30  7:43     ` Boris Brezillon
2015-06-04 20:52   ` Stephen Boyd
2015-06-04 20:52     ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 2/5] clk: st: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
2015-06-04 20:53     ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 3/5] clk: ti: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
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   ` 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-05-29  9:25   ` Geert Uytterhoeven
2015-06-03 23:44   ` Stephen Boyd
2015-06-03 23:44     ` Stephen Boyd
2015-06-04  7:26     ` Geert Uytterhoeven
2015-06-04  7:26       ` Geert Uytterhoeven
2015-06-04 18:14       ` Stephen Boyd [this message]
2015-06-04 18:14         ` 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=20150604181404.GF490@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=maxime.coquelin@st.com \
    --cc=mturquette@linaro.org \
    --cc=patrice.chotard@st.com \
    --cc=t-kristo@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.