RE: [PATCH v1 1/3]mmc: implemented runtime pm for mmc host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Ohad Ben-Cohen [mailto:ohad@xxxxxxxxxx]
> Sent: Monday, January 24, 2011 4:40 AM
> To: Nicolas Pitre
> Cc: Chris Ball; Dong, Chuanxiao; Tardy, Pierre; linux-mmc@xxxxxxxxxxxxxxx; Linus
> Walleij; Gao, Yunpeng
> Subject: Re: [PATCH v1 1/3]mmc: implemented runtime pm for mmc host
> 
> On Sun, Jan 23, 2011 at 7:20 AM, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
> > First case:  you want to stop the clock _to_ the _card_ when not talking
> > to it.  That has nothing to do with power saving performed within the
> > host controller.  This is for reducing power consumption by the _card_
> > (and possibly by the clock generator).  The runtime PM stuff has no
> > business here as the decision to gate the clock on the card require
> > MMC/SD protocol knowledge.
> 
> But why can't it be implemented using the runtime PM framework ?
> 
> It's just plumbing; the decision and knowledge stays at the MMC core.
> 
> It's possible to do it without making any compromises of use cases and
> requirements. And if something is missing in the runtime PM framework,
> it can be changed. It just needs someone who cares.
I agree with Ohad.
First I also agree with Nicolas clock gating and runtime pm are different cases, all of us want runtime pm and clock gating for mmc driver. So that, I think we can treat the clock gating as a shallow power consuming and runtime pm as a deep power consuming. When there is no new request after about 8 clock cycles idle, mmc driver can try to do a shallow power consuming - clock gating. And then if in the next a few time, host controller is still idle, we can try to do a deep power consuming - power off host controller. Is this acceptable?

Second, let us consider about the implementation about clock gating. To my understanding, what MMC driver does in clock gating framework is just waiting for 8 clock cycles and then trying to gate the clock, no other special. Linus W, correct me if I am wrong. The runtime pm framework also provide some functions which can let driver wait for some clock cycles and then try to do something. So I think we can use what the runtime pm framework provided to implement the clock gating, no need to maintain some code in MMC driver doing the same thing which has already been implemented by runtime pm framework.

We can use runtime pm framework to implement clock gating and power management. The two cases has no dependence with each other. If the host controller cannot power off, just not enable the runtime pm in host controller driver.

Thanks
Chuanxiao
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux