FW: [PATCH] mmc: mmci: Gate the clock in runtime suspend to save power

Linus Walleij linus.walleij at linaro.org
Wed Dec 12 13:49:42 EST 2012


On Wed, Dec 12, 2012 at 12:39 PM, Kevin Liu <keyuan.liu at gmail.com> wrote:

>> 3) In the suspend() callback, sleep until the clock indicates
>> that the card is declocked with something like:
>> while (clk_is_enabled(host->clk)) { sleep(1) }
>> However the clk framework does not have clk_is_enabled()
>> so you'd either have to add that or use a local atomic
>> variable host_clk_enabled set in (2).
>>
>> Should work, I think?
>
> Since we use pm runtime with delay setting to 50ms, so there is no such problem?

Depends on the clock to the card I guess?

The MMCI is default-clocked at 515633 Hz, so period
time T = 1/515633 and for 8 clock cycles on the card clock
it needs 8/515633 ~ 0.01 ms so it's pretty sufficient :-)

OK I'm in on using runtime PM then.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list