public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Todd Poynor <toddpoynor@google.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH] mfd: twl6030: Setup irq_wake infrastructure.
Date: Mon, 26 Sep 2011 10:50:07 +0200	[thread overview]
Message-ID: <20110926085007.GB32263@sortiz-mobl> (raw)
In-Reply-To: <20110915203738.GA23208@google.com>

Hi Todd,

On Thu, Sep 15, 2011 at 01:37:38PM -0700, Todd Poynor wrote:
> On Tue, Sep 06, 2011 at 09:29:30PM +0530, Santosh Shilimkar wrote:
> > TWL6030 devices have an interrupt line which is connected to
> > application processor like OMAP. These devices support multiple features
> > such as MMC card detect, USB cable detect, RTC interrupt, etc. that must
> > wake up the application processor.
> > 
> > With this change, TWL6030 client drivers can make use of
> > irq_wake() if the wakeup is desirable on it's irq events.
> > 
> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > cc: Samuel Ortiz <sameo@linux.intel.com>
> > ---
> >  drivers/mfd/twl6030-irq.c |    9 +++++++++
> >  1 files changed, 9 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
> > index eb3b5f8..4477134 100644
> > --- a/drivers/mfd/twl6030-irq.c
> > +++ b/drivers/mfd/twl6030-irq.c
> > @@ -187,6 +187,13 @@ static inline void activate_irq(int irq)
> >  #endif
> >  }
> >  
> > +int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
> > +{
> > +	int twl_irq = (int)irq_get_chip_data(d->irq);
> > +
> > +	return irq_set_irq_wake(twl_irq, on);
> 
> Note that when running with this previously, LOCKDEP warnings
> were seen.  LOCKDEP explicitly sets all irq_desc locks as a single
> lock-class, causing "possible recursive locking detected" when the TWL
> RTC (or other) driver calls through enable_irq_wake to
> twl6030_irq_set_wake, which recursively calls irq_set_irq_wake.
> Although the irq_desc and lock are different, LOCKDEP treats these as
> equivalent, presumably due to problems that can be incurred when
> locking more than one irq_desc.
> 
> Currently we're running with twl6030_irq_set_wake keeping a count of
> sub-module wakeirqs, and setting the wakeup status for the twl_irq
> enabled or disabled as needed at suspend time.  Can send a patch if
> wanted.
Please do. I'm currently considering removing Santosh's patch without this
LOCKDEP warning fix.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2011-09-26  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06 15:59 [PATCH] mfd: twl6030: Setup irq_wake infrastructure Santosh Shilimkar
2011-09-15 17:02 ` Samuel Ortiz
2011-09-15 17:26   ` Shilimkar, Santosh
2011-09-15 20:37 ` Todd Poynor
2011-09-16  4:37   ` Shilimkar, Santosh
2011-09-26  8:50   ` Samuel Ortiz [this message]
2011-09-26  9:31     ` Santosh Shilimkar
2011-09-26 22:58       ` Todd Poynor

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=20110926085007.GB32263@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=toddpoynor@google.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