Thread (8 messages) 8 messages, 5 authors, 2018-07-27

[PATCH] clk: Add functions to get optional clocks

From: Phil Edworthy <hidden>
Date: 2018-07-18 13:56:34
Also in: linux-clk, lkml

Hi Russell,

On 18 July 2018 14:19, Geert Uytterhoeven wrote:
On Wed, Jul 18, 2018 at 3:02 PM Russell King - ARM Linux  wrote:
quoted
On Wed, Jul 18, 2018 at 01:57:38PM +0100, Phil Edworthy wrote:
quoted
Behaves the same as (devm_)clk_get except where there is no clock
producer. In this case, instead of returning -ENOENT, the function
returns NULL. This makes error checking simpler and allows
clk_prepare_enable, etc to be called on the returned reference
without additional checks.
How does this work with non-DT systems, where looking a clock up which
isn't yet registered with clkdev returns -ENOENT ?

(clkdev doesn't know when all clocks are registered with it.)
Good question.

I guess all drivers trying to handle optional clocks this way are already broken
on non-DT systems where clocks may be registered late...
So how do non-DT systems that look a clock up which isn't yet
registered with clkdev, determine that an optional clock is there
or not?

Thanks
Phil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help