linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Chris Ball <cjb@laptop.org>, Balaji T K <balajitk@ti.com>,
	Andreas Fenkart <afenkart@gmail.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Linux-OMAP <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] mmc: omap_hsmmc: Remux pins to support SDIO interrupt and PM runtime
Date: Mon, 10 Jun 2013 09:23:56 -0700	[thread overview]
Message-ID: <20130610162356.GL8164@atomide.com> (raw)
In-Reply-To: <CACRpkdZ5CUvULBFpdHZ_AMotqfUdBcAQ63+8cT+r6TZ77bUWOA@mail.gmail.com>

* Linus Walleij <linus.walleij@linaro.org> [130610 09:09]:
> 
> You can use the new infrastructure to make the core select:
> 
> pinctrl_pm_select_default_state(host->dev);
> pinctrl_pm_select_idle_state(host->dev);

OK great.
 
> What is the semantic difference between "default" and "active"?

We only should remux the pins that need remuxing as that's done
every time hitting idle. So I think we should have the following
default groups:

default		Static pins that don't change, no need to remux
		configured in consumer driver probe like we already
		do

active		Optional dynamic pins remuxed for runtime, can be
		configured and selected in consumer driver probe.
		The consumer driver may also want to select this
		state in PM runtime resume.

idle		Optional dynamic pins remuxed for idle. The consumer
		driver may also want to select this state in PM
		runtime suspend depending on device_can_wakeup()
		and driver specific needs.
 
> If this is something very generic that a lot of platforms will want
> to have, why not add it to include/linux/pinctrl/pinctrl-state.h
> and augment the core to cache and handle this too?

Yes we should do that assuming the above grouping makes sense
to you.
 
> However in this case I *suspect* that what you really want
> to do it to rename the state called "default" to "sleep"
> (it appears the default state is sleepy) and then rename
> the "active" state to "default" (as this is the defined semantic
> meaning of "default" from <linux/pinctrl/pinctrl-state.h>.

The idle state above could also be called sleep instead of idle
if you prefer that.

> But maybe I'm not quite getting the subtle difference between
> "default" and "active" here so enlighten me.

I think the confusion is caused by the fact that we need three
mux groups, not just two :) The toggling between active and idle
is the hotpath as that can potentially happen for multiple drivers
every time we enter and exit idle.

Regards,

Tony

  reply	other threads:[~2013-06-10 16:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 21:49 [PATCH 0/4] Updated omap_hsmmc SDIO and remuxing patches Tony Lindgren
2013-06-07 21:49 ` [PATCH 1/4] mmc: omap_hsmmc: Fix context save and restore for DT Tony Lindgren
2013-06-08  4:25   ` Felipe Balbi
2013-06-08 15:02     ` Tony Lindgren
2013-06-07 21:49 ` [PATCH 2/4] mmc: omap_hsmmc: Enable SDIO IRQ using a GPIO in idle mode Tony Lindgren
2013-06-14  7:37   ` Tony Lindgren
2013-06-14 11:50   ` Ulf Hansson
2013-06-20  7:24     ` Tony Lindgren
2013-07-08  9:02   ` Felipe Balbi
2013-06-07 21:49 ` [PATCH 3/4] mmc: omap_hsmmc: Remux pins to support SDIO interrupt and PM runtime Tony Lindgren
2013-06-10 16:03   ` Linus Walleij
2013-06-10 16:23     ` Tony Lindgren [this message]
2013-06-11  7:54       ` Linus Walleij
2013-06-12 13:21         ` Tony Lindgren
2013-06-14  7:40           ` Tony Lindgren
2013-06-07 21:50 ` [PATCH 4/4] mmc: omap_hsmmc: debugfs entries for GPIO and SDIO mode Tony Lindgren

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=20130610162356.GL8164@atomide.com \
    --to=tony@atomide.com \
    --cc=afenkart@gmail.com \
    --cc=balajitk@ti.com \
    --cc=cjb@laptop.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).