From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] Introduce devm_clk_register()
Date: Mon, 24 Sep 2012 13:20:42 -0700 [thread overview]
Message-ID: <5060C09A.6080706@codeaurora.org> (raw)
In-Reply-To: <20120922100604.GI15609@n2100.arm.linux.org.uk>
On 09/22/12 03:06, Russell King - ARM Linux wrote:
> On Tue, Sep 18, 2012 at 11:05:27PM -0700, Stephen Boyd wrote:
>> The first patch in this series fixes error checking in the wm831x clock
>> driver and is here to prevent context conflicts in the third patch.
>> I split it out in case it needed to merge sooner rather than later.
>>
>> The goal of this series is to add devm_clk_register() so I can use it in
>> some MSM clock code I'm sending out in the near future. The second
>> patch adds the API and the third patch moves over an existing user of
>> clk_unregister() to the devm API.
> Can we guarantee that the clocks are unused when the module is removed?
> If we can't make that guarantee, then devm_* should not be used here,
> and instead there should be refcounting done in the clocks (that's what
> the __clk_get() and __clk_put() hooks are there for.)
We could guarantee that when clk_unregister() is actually implemented.
__clk_get() would need to forward a call to the module providing the
clock via try_module_get(). Similarly we would call module_put() in
__clk_put(). That would prevent unbinding the driver from the device via
module removal.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Mike Turquette <mturquette@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] Introduce devm_clk_register()
Date: Mon, 24 Sep 2012 13:20:42 -0700 [thread overview]
Message-ID: <5060C09A.6080706@codeaurora.org> (raw)
In-Reply-To: <20120922100604.GI15609@n2100.arm.linux.org.uk>
On 09/22/12 03:06, Russell King - ARM Linux wrote:
> On Tue, Sep 18, 2012 at 11:05:27PM -0700, Stephen Boyd wrote:
>> The first patch in this series fixes error checking in the wm831x clock
>> driver and is here to prevent context conflicts in the third patch.
>> I split it out in case it needed to merge sooner rather than later.
>>
>> The goal of this series is to add devm_clk_register() so I can use it in
>> some MSM clock code I'm sending out in the near future. The second
>> patch adds the API and the third patch moves over an existing user of
>> clk_unregister() to the devm API.
> Can we guarantee that the clocks are unused when the module is removed?
> If we can't make that guarantee, then devm_* should not be used here,
> and instead there should be refcounting done in the clocks (that's what
> the __clk_get() and __clk_put() hooks are there for.)
We could guarantee that when clk_unregister() is actually implemented.
__clk_get() would need to forward a call to the module providing the
clock via try_module_get(). Similarly we would call module_put() in
__clk_put(). That would prevent unbinding the driver from the device via
module removal.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2012-09-24 20:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 6:05 [PATCH 0/3] Introduce devm_clk_register() Stephen Boyd
2012-09-19 6:05 ` Stephen Boyd
2012-09-19 6:05 ` [PATCH 1/3] clk: wm831x: Fix clk_register() error code checking Stephen Boyd
2012-09-19 6:05 ` Stephen Boyd
2012-09-20 1:31 ` Mark Brown
2012-09-20 1:31 ` Mark Brown
2012-09-19 6:05 ` [PATCH 2/3] clk: Add devm_clk_{register,unregister}() Stephen Boyd
2012-09-19 6:05 ` Stephen Boyd
2012-09-21 2:33 ` Stephen Boyd
2012-09-21 2:33 ` Stephen Boyd
2012-09-22 1:07 ` Mike Turquette
2012-09-22 7:20 ` Stephen Boyd
2012-09-22 7:20 ` Stephen Boyd
2012-09-19 6:05 ` [PATCH 3/3] clk: wm831x: Use devm_clk_register() to simplify code Stephen Boyd
2012-09-19 6:05 ` Stephen Boyd
2012-09-20 1:40 ` Mark Brown
2012-09-20 1:40 ` Mark Brown
2012-09-22 10:06 ` [PATCH 0/3] Introduce devm_clk_register() Russell King - ARM Linux
2012-09-22 10:06 ` Russell King - ARM Linux
2012-09-24 20:20 ` Stephen Boyd [this message]
2012-09-24 20:20 ` Stephen Boyd
2012-09-24 20:35 ` Russell King - ARM Linux
2012-09-24 20:35 ` Russell King - ARM Linux
2012-09-24 20:38 ` [PATCHv2 1/3] clk: wm831x: Fix clk_register() error code checking Stephen Boyd
2012-09-24 20:38 ` Stephen Boyd
2012-09-24 20:38 ` [PATCHv2 2/3] clk: Add devm_clk_{register,unregister}() Stephen Boyd
2012-09-24 20:38 ` Stephen Boyd
2012-09-24 20:38 ` [PATCHv2 3/3] clk: wm831x: Use devm_clk_register() to simplify code Stephen Boyd
2012-09-24 20:38 ` Stephen Boyd
2012-10-29 18:13 ` [PATCHv2 1/3] clk: wm831x: Fix clk_register() error code checking Mike Turquette
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=5060C09A.6080706@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 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.