[PATCH 2/6] pinctrl: Update clock handling for the pinctrl-nomadik GPIO driver

Linus Walleij linus.walleij at linaro.org
Thu Oct 25 08:07:34 EDT 2012


On Thu, Oct 25, 2012 at 10:23 AM, Lee Jones <lee.jones at linaro.org> wrote:
> On Thu, 25 Oct 2012, Linus Walleij wrote:
>>
>> Yeah drop it for now.
>
> Actually, a quick question before I do:
>
> If it's better/faster to prepare the clock and keep it prepared
> while you do clk_enable/clk_disable,

It is generally faster that is why we call it fastpath.

E.g. if the clock hardware can do this in IRQ context by just
chaninging one bit in a quickly written register from 1->0 and
then the clock goes off from some silicon.

Whether it's "better" or not is a transcendental question,
as it requires a ruler to measure betterness.

> why don't we do that in all
> drivers? Why do we bother to prepare/unprepare each time if all
> it does is take up cycles?

Usually to save power.

Albeit saving power may be at odds with gaining the maximum
performance and/or latency.

So depending on the demands and use case the answer to
whether or not you want to do this will be different.

That's for the clock API.

In the ux500 case specifically, you can drill down to the
clock implementation and ask the question whether or not
we want to do this for this instance of the pin controller
in this case, I'll leave that for Ulf to answer... but remember
that this driver is also used for the Nomadik NHK8815.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list