All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: mturquette@baylibre.com, lee.jones@linaro.org,
	xuwei5@hisilicon.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH V2] clk: hi6220: Add the hi655x's pmic clock
Date: Fri, 21 Apr 2017 19:14:12 -0700	[thread overview]
Message-ID: <20170422021412.GE7065@codeaurora.org> (raw)
In-Reply-To: <20170419194737.GB2523@mai>

On 04/19, Daniel Lezcano wrote:
> On Wed, Apr 19, 2017 at 09:00:05AM -0700, Stephen Boyd wrote:
> > On 04/16, Daniel Lezcano wrote:
> > > On Wed, Apr 12, 2017 at 08:02:45AM -0700, Stephen Boyd wrote:
> > > > On 04/08, Daniel Lezcano wrote:
> 
> [ ... ]
> 
> > > > > +	ret = clk_hw_register_clkdev(&hi655x_clk->clk_hw, clk_name, NULL);
> > > > 
> > > > Missed this last time. Do you use this clkdev lookup? The name is
> > > > usually supposed to be based on what the device is expecting,
> > > > instead of clk_name, and we would want some device name for the
> > > > third argument here.
> > > 
> > > I'm not sure to get your comment. Are you saying the clk_name should be the
> > > third argument?
> > > 
> > > 
> > 
> > Sorry, no. I meant that con_id is typically something like "core"
> > or "ahb" or something like that, and dev_id is something like
> > "a456002.pmic_device" or whatever dev_name(pmic_dev) would return for
> > the consuming device. That way when we call clk_get(dev, "core")
> > it will find the lookup with "core" and "a456002.pmic_device" to
> > match up the clk lookup.
> > 
> > If anything, the clk_name should just go into the con_id for now,
> > and then it will need to be a globally unique identifier for the
> > clk. But that is going against how clkdev is supposed to be used.
> > Hence the question if you even need to use it. If not, just don't
> > add it. I can fix up v3 of this patch to put clk_name back at
> > con_id if you like. No need to resend.
> 
> Ok, I'm not very used with the CCF, so perhaps clk_name is not needed at all. I
> gave a try with the following combination:
> 
>  - con_id = NULL, dev_id = clk_name
>  - con_id = clk_name, dev_id = NULL
>  - con_id = NULL, dev_id = NULL
> 
> All worked.
> 
> And finally I removed the clk_hw_register_clkdev() call and it worked also.
> 
> So I'm not sure about this function.
> 

If you've removed it and it still works, then it means you're
using DT and you don't need clkdev at all. That's the of_clk
provider thing that you're using. So I'll go remove this clkdev
lookup because it's not used. If someone needs it they can add it
later.

-- 
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 V2] clk: hi6220: Add the hi655x's pmic clock
Date: Fri, 21 Apr 2017 19:14:12 -0700	[thread overview]
Message-ID: <20170422021412.GE7065@codeaurora.org> (raw)
In-Reply-To: <20170419194737.GB2523@mai>

On 04/19, Daniel Lezcano wrote:
> On Wed, Apr 19, 2017 at 09:00:05AM -0700, Stephen Boyd wrote:
> > On 04/16, Daniel Lezcano wrote:
> > > On Wed, Apr 12, 2017 at 08:02:45AM -0700, Stephen Boyd wrote:
> > > > On 04/08, Daniel Lezcano wrote:
> 
> [ ... ]
> 
> > > > > +	ret = clk_hw_register_clkdev(&hi655x_clk->clk_hw, clk_name, NULL);
> > > > 
> > > > Missed this last time. Do you use this clkdev lookup? The name is
> > > > usually supposed to be based on what the device is expecting,
> > > > instead of clk_name, and we would want some device name for the
> > > > third argument here.
> > > 
> > > I'm not sure to get your comment. Are you saying the clk_name should be the
> > > third argument?
> > > 
> > > 
> > 
> > Sorry, no. I meant that con_id is typically something like "core"
> > or "ahb" or something like that, and dev_id is something like
> > "a456002.pmic_device" or whatever dev_name(pmic_dev) would return for
> > the consuming device. That way when we call clk_get(dev, "core")
> > it will find the lookup with "core" and "a456002.pmic_device" to
> > match up the clk lookup.
> > 
> > If anything, the clk_name should just go into the con_id for now,
> > and then it will need to be a globally unique identifier for the
> > clk. But that is going against how clkdev is supposed to be used.
> > Hence the question if you even need to use it. If not, just don't
> > add it. I can fix up v3 of this patch to put clk_name back at
> > con_id if you like. No need to resend.
> 
> Ok, I'm not very used with the CCF, so perhaps clk_name is not needed at all. I
> gave a try with the following combination:
> 
>  - con_id = NULL, dev_id = clk_name
>  - con_id = clk_name, dev_id = NULL
>  - con_id = NULL, dev_id = NULL
> 
> All worked.
> 
> And finally I removed the clk_hw_register_clkdev() call and it worked also.
> 
> So I'm not sure about this function.
> 

If you've removed it and it still works, then it means you're
using DT and you don't need clkdev at all. That's the of_clk
provider thing that you're using. So I'll go remove this clkdev
lookup because it's not used. If someone needs it they can add it
later.

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

  reply	other threads:[~2017-04-22  2:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08 20:30 [PATCH V2] clk: hi6220: Add the hi655x's pmic clock Daniel Lezcano
2017-04-08 20:30 ` Daniel Lezcano
2017-04-08 20:30 ` Daniel Lezcano
2017-04-11 14:06 ` Lee Jones
2017-04-11 14:06   ` Lee Jones
2017-04-11 21:19   ` Daniel Lezcano
2017-04-11 21:19     ` Daniel Lezcano
2017-04-11 21:19     ` Daniel Lezcano
2017-04-12  8:00     ` Lee Jones
2017-04-12  8:00       ` Lee Jones
2017-04-12 12:10       ` Daniel Lezcano
2017-04-12 12:10         ` Daniel Lezcano
2017-04-12 12:10         ` Daniel Lezcano
2017-04-12 13:34         ` Lee Jones
2017-04-12 13:34           ` Lee Jones
2017-04-12 15:02 ` Stephen Boyd
2017-04-12 15:02   ` Stephen Boyd
2017-04-16 20:57   ` Daniel Lezcano
2017-04-16 20:57     ` Daniel Lezcano
2017-04-16 20:57     ` Daniel Lezcano
2017-04-19 16:00     ` Stephen Boyd
2017-04-19 16:00       ` Stephen Boyd
2017-04-19 19:47       ` Daniel Lezcano
2017-04-19 19:47         ` Daniel Lezcano
2017-04-22  2:14         ` Stephen Boyd [this message]
2017-04-22  2:14           ` Stephen Boyd
2017-04-24  9:31 ` Lee Jones
2017-04-24  9:31   ` Lee Jones
2017-04-24  9:43   ` Daniel Lezcano
2017-04-24  9:43     ` Daniel Lezcano

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=20170422021412.GE7065@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=xuwei5@hisilicon.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.