public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@google.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-omap@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 2/2] mfd: twl6030: Disable IRQ during suspend
Date: Mon, 26 Sep 2011 16:44:24 -0700	[thread overview]
Message-ID: <1317080664-28096-2-git-send-email-toddpoynor@google.com> (raw)
In-Reply-To: <1317080664-28096-1-git-send-email-toddpoynor@google.com>

Module IRQs may still be disabled by DPM at the time the TWL6030
ISR runs, causing handle_simple_irq() to silently do nothing.
This may result in missing TWL RTC alarm wakeups, for example,
since the RTC child module ISR is not called to ack the IRQ.

Disable the TWL6030 IRQ during suspend, enable it at DPM resume
time, at which time the child module IRQs will be re-enabled.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 drivers/mfd/twl6030-irq.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 7d6553c..5c08ecd 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -109,7 +109,13 @@ static int twl6030_irq_pm_notifier(struct notifier_block *notifier,
 			twl_irq_wake_enabled = false;
 		}
 
+		disable_irq(twl_irq);
 		break;
+
+	case PM_POST_SUSPEND:
+		enable_irq(twl_irq);
+		break;
+
 	default:
 		break;
 	}
-- 
1.7.3.1


  reply	other threads:[~2011-09-26 23:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 23:44 [PATCH 1/2] mfd: twl6030: fix lockdep recursion warning on setting wake IRQs Todd Poynor
2011-09-26 23:44 ` Todd Poynor [this message]
2011-09-27  5:15   ` [PATCH 2/2] mfd: twl6030: Disable IRQ during suspend Santosh Shilimkar
2011-10-04  9:57   ` Samuel Ortiz
2011-09-27  5:14 ` [PATCH 1/2] mfd: twl6030: fix lockdep recursion warning on setting wake IRQs Santosh Shilimkar
2011-10-04  9:56 ` Samuel Ortiz

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=1317080664-28096-2-git-send-email-toddpoynor@google.com \
    --to=toddpoynor@google.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=santosh.shilimkar@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