Re: [RFC] API for system clocks (oscillators)

From: Jonas Bonn
Date: Thu Oct 30 2008 - 13:01:56 EST


>
> You could probably work those features into the existing clk framework.
> clk_set_rate() could compute the constrains and return an error.
> The API could be expanded with notifier support.
>

I started in this end, too, and got frequency change notification
working, at least. There are issues with mutexes that "might_sleep"
when calling set_rate from cpuidle driver, but nothing that can't be
fixed...

What drove me to document a new interface is the fact that there are
so many users of "struct clk" already, that it becomes conceptually
easier to dream up something new that stays out of the way, even if
that new thing becomes just a wrapper around the existing interface
(which I am well aware that it largely is) with some new
functionality. If we can bolt the new stuff onto the existing stuff,
then that's even better; however, I know that yesterday I was longing
to be able to start from scratch and "do it right"! After writing my
document, though, I think I have largely validated the model that's in
place...

That said, I still think there is value in the additional features.

/Jonas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/