lkml.org 
[lkml]   [2015]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Automatic clock disabling on clk_put()
On Wed, May 13, 2015 at 12:45:12PM -0700, Stephen Boyd wrote:
> On 05/12/15 23:45, Uwe Kleine-König wrote:
> >
> >> that hard to call clk_disable_unprepare() on a clock at the end of an
> >> error path? Maybe you could add a devm_clk_get_prepare_enable() that
> >> does what you want and then call clk_disable_unprepare on the exit path?
> > You mean clk_disable_unprepare is called in the same function that calls
> > clk_put I assume such that you don't have to do anything in the exit
> > path.
> >
>
> Yes that's what I mean.

In terms of stopping people doing:

clk = clk_get(...);
clk_prepare_enable(clk);
clk_put(clk);

I think this is a good thing, because it ensures that people can't do
this anymore.

I think you need to audit the code properly first, and fix any instances
of that _before_ posting patches with your idea - let's try to avoid as
much as possible any breakage resulting from this.

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


\
 
 \ /
  Last update: 2015-05-13 22:21    [W:0.082 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site