public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@stericsson.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Ghorai Sukumar <s-ghorai@ti.com>, Chris Ball <cjb@laptop.org>,
	Nicolas Pitre <nico@fluxnic.net>,
	Adrian Hunter <adrian.hunter@nokia.com>,
	"jh80.chung@samsung.com" <jh80.chung@samsung.com>,
	Kyungmin Park <kmpark@infradead.org>,
	"arm-kernel@lists.infradead.org" <arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] MMC Agressive clocking framework v7
Date: Wed, 3 Nov 2010 14:18:39 +0100	[thread overview]
Message-ID: <4CD1612F.10507@stericsson.com> (raw)
In-Reply-To: <AANLkTims3RhKmPxxxL_T32DN96kSrEE415FE1320fbNO@mail.gmail.com>

Ohad Ben-Cohen wrote:

> Have you considered migrating this to runtime PM API ?
>
> Runtime PM core already provides most of the necessary plumbing:
> referred work, reference counting, tunable delay, active/suspended
> status, etc..

Doesn't it require a struct device* to be used?

I cannot use the host controller struct because that may be using
dev_pm_ops for some other scheme.

> It will also allow you to avoid overloading the set_ios() operation:
> once suspended, host controllers will receive an idle notification
> from runtime PM core. also CONFIG_MMC_CLKGATE will probably not be
> needed anymore (no API changes so everything should just work as
> before. only difference is that now hosts can start supporting  these
> runtime PM notifications).

Then you must mean that it should be implemented in each and every
driver instead, like it is today. We had a long discussion about
that already.

This means replicating the knowledge of the last card operation,
the 8 MCI cycles required for the timeout and the check
that the card is not sdio into every single driver instead of
moving it up in the core (as was Pierre Ossmans original
suggestion some two years ago or so).

Right now the way I see it the host driver can support
dev_pm_ops and simply call runtime_pm_put() when it recieves an
ios with clock frequency 0, so it's not like it contradicts
runtime PM.

The plumbing used in runtime PM is however very applicable to the
task, so if it could be made to work in a subsystem without any
struct device* anchor, it would be very reusable. Is this
feasible?

Yours,
Linus Walleij

  parent reply	other threads:[~2010-11-03 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 16:06 [PATCH 1/2] MMC Agressive clocking framework v7 Linus Walleij
2010-11-03 10:03 ` Ohad Ben-Cohen
2010-11-03 12:25   ` Nicolas Pitre
2010-11-03 13:18   ` Linus Walleij [this message]
2010-11-03 13:44     ` Alan Cox
2010-11-03 14:30       ` Linus Walleij

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=4CD1612F.10507@stericsson.com \
    --to=linus.walleij@stericsson.com \
    --cc=adrian.hunter@nokia.com \
    --cc=arm-kernel@lists.infradead.org \
    --cc=cjb@laptop.org \
    --cc=jh80.chung@samsung.com \
    --cc=kmpark@infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=ohad@wizery.com \
    --cc=s-ghorai@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox