From patchwork Wed Apr 22 04:52:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kim kyuwon X-Patchwork-Id: 19313 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3M4rKMc002293 for ; Wed, 22 Apr 2009 04:53:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750890AbZDVExS (ORCPT ); Wed, 22 Apr 2009 00:53:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751302AbZDVExS (ORCPT ); Wed, 22 Apr 2009 00:53:18 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:52467 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbZDVExS (ORCPT ); Wed, 22 Apr 2009 00:53:18 -0400 Received: from epmmp1 (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0KIH00K6XK6YH5@mailout4.samsung.com> for linux-omap@vger.kernel.org; Wed, 22 Apr 2009 13:52:10 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0KIH00MNHK6Y0E@mmp1.samsung.com> for linux-omap@vger.kernel.org; Wed, 22 Apr 2009 13:52:10 +0900 (KST) Received: from [165.213.135.232] ([165.213.135.232]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Apr 2009 13:52:10 +0900 Date: Wed, 22 Apr 2009 13:52:09 +0900 From: Kim Kyuwon Subject: Suggestion and patch about the alarm of TWL4030-RTC To: Alexandre Rusev , OMAP Cc: =?windows-1252?Q?=22=3F=3F=3F=22?= , =?windows-1252?Q?=22=3F=3F=3F=22?= , David Brownell , Kevin Hilman , rtc-linux@googlegroups.com, chammoru@gmail.com Message-id: <49EEA279.2010202@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.21 (X11/20090318) X-OriginalArrivalTime: 22 Apr 2009 04:52:10.0057 (UTC) FILETIME=[183BEB90:01C9C306] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi All, From the twl4030_rtc_suspend() in rtc-twl4030.c, the alarm signal of TWL4030 RTC can't wake up the system form suspend. However, I think it is more reasonable to alarm wake up the system and this is just we do. (Mobile phone is mostly in suspend state, especially in the morning, thus alarm signal can wake up the phone!) So I'm sending following patch. Please give your comments. I really want to apply this patch. Thanks & Regards, Kyuwon --- From 9d70ffc38653b1fb0dc7ae0950502e4adfe06c50 Mon Sep 17 00:00:00 2001 From: Kim Kyuwon Date: Wed, 22 Apr 2009 13:29:50 +0900 Subject: [PATCH] rtc: rtc-twl4030 don't mask alarm interrupts on suspend This patch enables the alarm interrupt of TWL4030 RTC to wake up the system from suspend Signed-off-by: Kim Kyuwon --- drivers/rtc/rtc-twl4030.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-twl4030.c b/drivers/rtc/rtc-twl4030.c index ad35f76..c185939 100644 --- a/drivers/rtc/rtc-twl4030.c +++ b/drivers/rtc/rtc-twl4030.c @@ -495,9 +495,7 @@ static int twl4030_rtc_suspend(struct platform_device *pdev, pm_message_t state) { irqstat = rtc_irq_bits; - /* REVISIT alarm may need to wake us from sleep */ - mask_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M | - BIT_RTC_INTERRUPTS_REG_IT_ALARM_M); + mask_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); return 0; }