From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-clk <linux-clk@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] clk: Add devm_clk_{prepare,enable,prepare_enable}
Date: Mon, 25 Nov 2019 14:10:21 +0100 [thread overview]
Message-ID: <c7414301-da0d-cd4d-237d-34277f5ee1d2@free.fr> (raw)
In-Reply-To: <20191125125530.GP25745@shell.armlinux.org.uk>
On 25/11/2019 13:55, Russell King - ARM Linux admin wrote:
> It's also worth reading https://lore.kernel.org/patchwork/patch/755667/
> and considering whether you really are using the clk_prepare() and
> clk_enable() APIs correctly. Wanting these devm functions suggests
> you aren't...
In that older thread, you wrote:
> If you take the view that trying to keep clocks disabled is a good way
> to save power, then you'd have the clk_prepare() or maybe
> clk_prepare_enable() in your run-time PM resume handler, or maybe even
> deeper in the driver... the original design goal of the clk API was to
> allow power saving and clock control.
>
> With that in mind, getting and enabling the clock together in the
> probe function didn't make sense.
>
> I feel that aspect has been somewhat lost, and people now regard much
> of the clk API as a bit of a probe-time nuisance.
In the few drivers I've written, I call clk_prepare_enable() at probe.
And since clk_prepare_enable() is the only non-devm function in probe,
I need either a remove function, or an explicit registration step.
You seem to be saying I'm using the clk API in the wrong way?
Regards.
next prev parent reply other threads:[~2019-11-25 13:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 15:34 [PATCH v1] clk: Add devm_clk_{prepare,enable,prepare_enable} Marc Gonzalez
2019-07-15 21:46 ` Bjorn Andersson
2019-11-25 13:50 ` Marc Gonzalez
2019-07-16 0:25 ` Guenter Roeck
2019-07-16 8:18 ` Marc Gonzalez
2019-08-20 8:46 ` Marc Gonzalez
2019-11-25 12:46 ` Marc Gonzalez
2019-11-25 12:51 ` Marc Gonzalez
2019-11-25 12:52 ` Russell King - ARM Linux admin
2019-11-25 13:16 ` Marc Gonzalez
2019-11-25 13:31 ` Russell King - ARM Linux admin
2019-11-25 13:34 ` Marc Gonzalez
2019-11-25 13:38 ` Russell King - ARM Linux admin
2019-11-25 12:55 ` Russell King - ARM Linux admin
2019-11-25 13:10 ` Marc Gonzalez [this message]
2019-11-25 13:37 ` Russell King - ARM Linux admin
2019-11-25 14:11 ` Marc Gonzalez
2019-11-25 20:43 ` Geert Uytterhoeven
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=c7414301-da0d-cd4d-237d-34277f5ee1d2@free.fr \
--to=marc.w.gonzalez@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.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