From: Stephen Boyd <sboyd@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
ulf.hansson@linaro.org
Cc: linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org
Subject: Re: clk: clk_register is deprecated
Date: Tue, 05 May 2020 12:10:14 -0700 [thread overview]
Message-ID: <158870581453.26370.15255632521260524214@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <1j368egyie.fsf@starbuckisacylon.baylibre.com>
Quoting Jerome Brunet (2020-05-05 09:03:21)
>
> On Mon 04 May 2020 at 19:16, Stephen Boyd <sboyd@kernel.org> wrote:
>
> > Quoting Jerome Brunet (2020-04-30 05:24:41)
> >>
> >> If not, what would be the recommended way to get the "struct clk*" from
> >> a newly registered "struct clk_hw *" ? Should we add something new to
> >> clk-provider.h API ?
> >>
> >
> > Yes we should add a clk_hw_get_clk() API that takes a device pointer and
> > a string name, mirroring the clk_get() API but cutting out the part
> > where we have to go through the provider to find it.
>
> We will try to propose something for clk_hw_get_clk() soon.
> If we do so, could we "UN-deprecate" clk_register() and make it a
> wrapper around clk_hw_register() and clk_hw_get_clk() ?
>
> It would make it easier on drivers which both register and use clocks.
>
> To get a short term solution for Martin and his MMC driver:
> - If the above wrapper is OK and we commit on doing it soon, would you
> also be OK for martin to use clk_register() in his MMC driver (now) ?
>
> - If not, could we use clk_hw->clk until we have clk_hw_get_clk() in
> CCF ?
Using clk_hw->clk until we have clk_hw_get_clk() is fine for now.
Various drivers do that already and I hope that a simple coccinelle
script can figure out how to convert that to the new function.l Is it
much work to introduce this API now? I thought it would be fairly simple
to do it but I haven't looked deeply.
>
> >
> > This is so that one day in "the future" we can remove hw->clk and make
> > that an internal detail that struct clk_hw can't see because we go
> > through the clk_hw::clk_core pointer instead.
>
> Yes, I know it is your secret plan ... ;)
>
>
Hehe
prev parent reply other threads:[~2020-05-05 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 12:24 clk: clk_register is deprecated Jerome Brunet
2020-05-04 17:16 ` Stephen Boyd
2020-05-05 16:03 ` Jerome Brunet
2020-05-05 19:10 ` 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=158870581453.26370.15255632521260524214@swboyd.mtv.corp.google.com \
--to=sboyd@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=ulf.hansson@linaro.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).