[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 2 Feb 2015 17:49:45 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Mike Turquette <mturquette@...aro.org>
Cc: Tony Lindgren <tony@...mide.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Linux MIPS Mailing List <linux-mips@...ux-mips.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
Chao Xie <chao.xie@...vell.com>,
Haojian Zhuang <haojian.zhuang@...aro.org>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Jonathan Corbet <corbet@....net>,
Emilio L??pez <emilio@...pez.com.ar>,
Linux-sh list <linux-sh@...r.kernel.org>,
Alex Elder <elder@...aro.org>,
Zhangfei Gao <zhangfei.gao@...aro.org>,
Bintian Wang <bintian.wang@...wei.com>,
Matt Porter <mporter@...aro.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Tero Kristo <t-kristo@...com>,
Manuel Lauss <manuel.lauss@...il.com>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Subject: Re: [PATCH v13 4/6] clk: Add rate constraints to clocks
On Mon, Feb 02, 2015 at 09:46:46AM -0800, Mike Turquette wrote:
> This looks like mis-matched enable/disable calls. We now have unique
> struct clk pointers for every call to clk_get. I haven't yet looked
> through the hwmod code but I have a feeling that we're doing something
> like this:
>
> /* enable clock */
> my_clk = clk_get(...);
> clk_prepare_enable(my_clk);
> clk_put(my_clk);
>
> /* do some work */
> do_work();
>
> /* disable clock */
> my_clk = clk_get(...);
> clk_disable_unprepare(my_clk);
> clk_put(my_clk);
>
> The above pattern no longer works since my_clk will be two different
> unique pointers, but it really should be one stable pointer across the
> whole usage of the clk. E.g:
Yes, it has always been documented that shall be the case. Anyone doing
the above is basically broken.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists