Re: [PATCH] spi: pl022: Add clk_{un}prepare() support in runtime PM

From: Linus Walleij
Date: Tue Sep 18 2012 - 07:50:49 EST


On Tue, Sep 18, 2012 at 6:09 AM, viresh kumar <viresh.kumar@xxxxxxxxxx> wrote:

> Yes, we don't need to call prepare() again atleast for SPEAr. You are correct.
> I saw the driver after a long time :)

I'm asking because it's actually OK to do this, I was more asking whether it
was really needed by any platforms...

> Can you please elaborate, why can't i see any clk_disable/enable calls anywhere
> else from probe. If i remember correctly, earlier we used to enable/disable
> clk after transfers and also during suspend/resume.

We clk_disable() at runtime_suspend() and clk_enable() at runtime resume,
and the driver gives hints to the runtime PM layer to autosuspend the
driver whenever it's unused. Check the pm_runtime_* calls.

> The amba layer is taking care of interface clock only and not
> functional clock. So
> i believe that's not the magic code. :)

This clock is the one for the external bus. In some designs these two
clocks are one and the same, and these won't currently get into any clock
disabled states, sadly. (We need to fix that some day.)

Yours,
Linus Walleij
--
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/