[PATCH] clk: provide public clk_is_enabled function

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sat Oct 5 16:24:30 EDT 2013


On Fri, Oct 04, 2013 at 12:08:30PM +0200, Sebastian Hesselbarth wrote:
> To determine if a clk has been previously enabled, provide a public
> clk_is_enabled function. This is especially helpful to check the state
> of clk-gate without actually changing the state of the gate.
I wonder what you want to do with the return value.

When doing

	if (clk_is_enabled(someclk))
		do_something();

you cannot in general know if the clock is still on when you start to
do_something.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list