linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Andreas Fenkart <afenkart@gmail.com>, Chris Ball <cjb@laptop.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Felipe Balbi <balbi@ti.com>, Balaji T K <balajitk@ti.com>,
	zonque@gmail.com, linux-doc@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.
Date: Mon, 25 Nov 2013 19:16:10 -0600	[thread overview]
Message-ID: <20131126011610.GB21580@saruman.home> (raw)
In-Reply-To: <20131125224601.GX10023@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

Hi,

On Mon, Nov 25, 2013 at 02:46:02PM -0800, Tony Lindgren wrote:
> * Andreas Fenkart <afenkart@gmail.com> [131125 05:30]:
> > --- a/drivers/mmc/host/omap_hsmmc.c
> > +++ b/drivers/mmc/host/omap_hsmmc.c
> > @@ -452,10 +475,23 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
> >  	} else
> >  		pdata->slots[0].gpio_wp = -EINVAL;
> >  
> > +	if (gpio_is_valid(pdata->slots[0].gpio_cirq)) {
> > +		ret = gpio_request_one(pdata->slots[0].gpio_cirq, GPIOF_DIR_IN,
> > +				       "sdio_cirq");
> > +		if (ret)
> > +			goto err_free_ro;
> > +
> > +	} else {
> > +		pdata->slots[0].gpio_cirq = -EINVAL;
> > +	}
> > +
> > +
> >  	return 0;
> >  
> > +err_free_ro:
> > +	if (gpio_is_valid(pdata->slots[0].gpio_wp))
> >  err_free_wp:
> > -	gpio_free(pdata->slots[0].gpio_wp);
> > +		gpio_free(pdata->slots[0].gpio_wp);
> >  err_free_cd:
> >  	if (gpio_is_valid(pdata->slots[0].switch_pin))
> >  err_free_sp:
> 
> This patch we can now make a bit more generic with the recent addition
> of interrupts-extended property that's now merged in mainline tree :)
> 
> We can optionally pass two interrupts to omap_hsmmc.c where the second
> interrupt is either the pinctrl-single wake-up interrupt, or the GPIO
> interrupt.
> 
> Both the iochain wake interrupt or the GPIO interrupt are available with
> request_irq as long as configured in the .dts file. And can both use the
> SDIO interrupt handler. The only difference is that the GPIO wake-up
> still needs to do the dynamic remuxing of pins.

could that be done automatically if DTS provides "suspend" pinctrl
state ?

Would that be done before or after driver's ->{runtime_,}suspend()
methods ?

> mmc: mmc@4810abcd {
> 	compatible = "ti,omap33xx-hsmmc";

I would rather call it "ti,am33xx-hsmmc" just to make it match marketing
name of the device.

> Then the logic of enabling the dynamic remuxing can be done based
> on the ti,omap33xx-hsmmc compatible flag if there are two interrupts
> and the needed pin states are defined.

or maybe dynamic remuxing can be done by calling pinctrl_select_state()
with appropriate arguments ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-11-26  1:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 13:26 [PATCH v3 0/3] mmc: omap_hsmmc: Enable SDIO IRQ Andreas Fenkart
2013-11-25 13:26 ` [PATCH v3 1/3] " Andreas Fenkart
2013-11-25 13:26 ` [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x Andreas Fenkart
2013-11-25 22:46   ` Tony Lindgren
2013-11-26  1:16     ` Felipe Balbi [this message]
2013-11-26 18:06       ` Tony Lindgren
2013-11-27 16:59     ` Balaji T K
2013-11-27 17:04       ` Tony Lindgren
2013-11-25 13:26 ` [PATCH v3 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux Andreas Fenkart
  -- strict thread matches above, loose matches on Subject: below --
2013-11-18  7:53 [PATCH v3 0/3] mmc: omap_hsmmc: Enable SDIO IRQ Andreas Fenkart
2013-11-18  7:53 ` [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x Andreas Fenkart
2013-11-18 10:03   ` Michael Trimarchi
2013-11-18 12:15     ` Andreas Fenkart
2013-11-18 16:22       ` Balaji T K
2013-11-19 15:49         ` Tony Lindgren
2013-11-19 15:59           ` Balaji T K
2013-11-19 16:19             ` Tony Lindgren
2013-11-21 11:37               ` Andreas Fenkart
2013-11-21 11:58                 ` Balaji T K
2014-06-30 12:23             ` Andreas Fenkart
2013-11-19 13:18   ` Ulf Hansson
2013-11-19 13:37     ` Andreas Fenkart
2013-11-19 15:09       ` Ulf Hansson

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=20131126011610.GB21580@saruman.home \
    --to=balbi@ti.com \
    --cc=afenkart@gmail.com \
    --cc=balajitk@ti.com \
    --cc=cjb@laptop.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=zonque@gmail.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;
as well as URLs for NNTP newsgroup(s).