All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: Michael Turquette <mturquette@baylibre.com>,
	Russell King <linux@armlinux.org.uk>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, yuantian.tang@nxp.com,
	leoyang.li@nxp.com, xiaofeng.ren@nxp.com
Subject: Re: [PATCH v3 2/2] cpufreq: qoriq: Don't look at clock implementation details
Date: Fri, 08 Jul 2016 16:06:54 -0500	[thread overview]
Message-ID: <1468012014.32358.74.camel@buserror.net> (raw)
In-Reply-To: <146794477678.73491.8244253339435407853@resonance>

On Thu, 2016-07-07 at 19:26 -0700, Michael Turquette wrote:
> Quoting Scott Wood (2016-07-06 21:13:23)
> > 
> > On Wed, 2016-07-06 at 18:30 -0700, Michael Turquette wrote:
> > > 
> > > Quoting Scott Wood (2016-06-15 23:21:25)
> > > > 
> > > > 
> > > > -static struct device_node *cpu_to_clk_node(int cpu)
> > > > +static struct clk *cpu_to_clk(int cpu)
> > > >  {
> > > > -       struct device_node *np, *clk_np;
> > > > +       struct device_node *np;
> > > > +       struct clk *clk;
> > > >  
> > > >         if (!cpu_present(cpu))
> > > >                 return NULL;
> > > > @@ -112,37 +80,28 @@ static struct device_node *cpu_to_clk_node(int
> > > > cpu)
> > > >         if (!np)
> > > >                 return NULL;
> > > >  
> > > > -       clk_np = of_parse_phandle(np, "clocks", 0);
> > > > -       if (!clk_np)
> > > > -               return NULL;
> > > > -
> > > > +       clk = of_clk_get(np, 0);
> > > Why not use devm_clk_get here?
> > devm_clk_get() is a wrapper around clk_get() which is not the same as
> > of_clk_get().  What device would you pass to devm_clk_get(), and what name
> > would you pass?
> I'm fuzzy on whether or not you get a struct device from a cpufreq
> driver. If so, then that would be the one to use. I would hope that
> cpufreq drivers model cpus as devices, but I'm really not sure without
> looking into the code.

It's not the cpufreq code that provides it, but get_cpu_device() could be
used.

Do you have any comments on the first patch of this set?

-Scott

  reply	other threads:[~2016-07-08 21:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  6:21 [PATCH v3 1/2] clk: Add consumer APIs for discovering possible parent clocks Scott Wood
2016-06-16  6:21 ` [PATCH v3 2/2] cpufreq: qoriq: Don't look at clock implementation details Scott Wood
2016-07-07  1:30   ` Michael Turquette
2016-07-07  1:30     ` Michael Turquette
2016-07-07  4:13     ` Scott Wood
2016-07-08  2:26       ` Michael Turquette
2016-07-08  2:26         ` Michael Turquette
2016-07-08 21:06         ` Scott Wood [this message]
2016-07-20  3:02           ` Yuantian Tang
2016-07-20  3:02             ` Yuantian Tang
2017-02-02 18:11             ` Leo Li
2017-02-06  6:12               ` Y.T. Tang
2016-06-29  5:50 ` [PATCH v3 1/2] clk: Add consumer APIs for discovering possible parent clocks Yuantian Tang
2016-06-29  5:50   ` Yuantian Tang
2016-06-30  1:46   ` Rafael J. Wysocki
2016-06-30  1:47     ` Yuantian Tang
2016-06-30  1:47       ` Yuantian Tang
2016-06-30  2:24       ` Rafael J. Wysocki
2016-06-30  3:01         ` Yuantian Tang
2016-06-30  3:01           ` Yuantian Tang
2016-06-30  5:46           ` Scott Wood
2016-06-30  5:46             ` Scott Wood
2016-06-30 13:29             ` Rafael J. Wysocki
2016-07-01  6:55               ` Scott Wood
2016-07-01  6:55                 ` Scott Wood
2016-07-01 20:53                 ` Rafael J. Wysocki
2016-07-01 20:57                   ` Scott Wood

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=1468012014.32358.74.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=leoyang.li@nxp.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mturquette@baylibre.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    --cc=xiaofeng.ren@nxp.com \
    --cc=yuantian.tang@nxp.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.