All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@stericsson.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Linus WALLEIJ <linus.walleij@stericsson.com>
Subject: Re: [PATCH 2/2] mmc: sdhci-pci: add runtime pm support
Date: Thu, 6 Oct 2011 16:39:00 +0200	[thread overview]
Message-ID: <4E8DBD84.8070103@stericsson.com> (raw)
In-Reply-To: <4E8D5D07.4010604@intel.com>

> 
> It has been discussed on the list before that the host controller driver should 
> be solely responsible for host controller power.

OK I see, sorry that I missed that discussion earlier!

Anyway this should be feasible as well even it might mean duplicated 
code in each host driver. A positive side is that it gets more flexible 
for each host driver.

> 
>>
>> Moreover 1:
>> I have noticed the pm_runtime support is implemented for sdio and when having
>> MMC_CAP_POWER_OFF_CARD. This needs to be "cleaned up" after such a change. It
>> might also conflict with your patch considering "moreover 2" below.
> 
> No.  The card and the host controller are separate devices.  The card can be 
> powered up when the host controller is off and vice versa.  They are not 
> inter-dependent in that regard.

I see your point, but it is somewhere here it is getting a bit "messy". :-)

If I understand correct, you mean that the mmc/sd/sdio framework shall
be responsible of handling power management of the bus/card devices. In
other words the framework shall itself decide when it is feasible of
doing mmc_power_restore_host, mmc_power_save_host, mmc_suspend_host,
mmc_resume_host.

This is not the case right now, since most host drivers are normally in
control of calling these functions themselves. Should this be moved to 
the framework then?

> 
>> Moreover 2:
>> dev_pm_ops with runtime functions, are implemented for the mmc bus (core/bus.c).
>> Maybe this should be moved from the responsibility of the bus into the mmc host
>> drivers instead!? I think it makes more sense to leave such decisions as doing
>> "mmc_power_save_host/mmc_power_restore_host" to each mmc host driver. Just
>> because we get runtime suspended that does not have to mean we wnat to do
>> mmc_power_save_host... What do you think?
> 
> Again, this has been discussed before on the list, that the power management of 
> the card is something that only upper layers control e.g. sdio function driver
> 

I got it, thanks a lot for your answers and feedback!


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


BR
Ulf Hansson

  reply	other threads:[~2011-10-06 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 12:33 [PATCH 0/2] mmc: sdhci-pci: add runtime pm support Adrian Hunter
2011-10-03 12:33 ` [PATCH 1/2] mmc: core: move ->request() call from atomic context Adrian Hunter
2011-10-05 13:56   ` Ulf Hansson
2011-10-10 22:05     ` Chris Ball
2011-10-03 12:33 ` [PATCH 2/2] mmc: sdhci-pci: add runtime pm support Adrian Hunter
2011-10-04  4:44   ` Jaehoon Chung
2011-10-04  6:22     ` Adrian Hunter
2011-10-05 14:59   ` Ulf Hansson
2011-10-06  7:47     ` Adrian Hunter
2011-10-06 14:39       ` Ulf Hansson [this message]
2011-10-10 22:07   ` Chris Ball
2011-10-16  1:06   ` Chris Ball
2011-10-16  2:26     ` Chris Ball
2011-10-17  8:19       ` Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8DBD84.8070103@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.