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: 26295 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from wa-out-1516.google.com (wa-out-1516.google.com [209.85.146.162]) by bilbo.ozlabs.org (Postfix) with ESMTP id 57074B6F35 for ; Wed, 22 Apr 2009 14:53:03 +1000 (EST) Received: by wa-out-1516.google.com with SMTP id c2so2281499waa.1 for ; Tue, 21 Apr 2009 21:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:received:date:from:subject:to:cc:message-id:mime-version :content-type:content-transfer-encoding:user-agent :x-originalarrivaltime:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=iq2FXiO+oIhP5BSRIFzJdK6aGwP6nV7qTb+IDHy7tWU=; b=UodFlQ9hJJbWHA8PGHXVlHG2xHijbTDYfxVuWGT43AzeFRYj/dri8janZEVawbQHMR JAh3srMijyNcqWAKZKTnMgCcJcRPbJXyRvr/3Y+JBmqsGGuTwS+DN3kHfUduH+LsO5C5 5wtsNV9kFQXg0O8M8UGHgNdWbnwlPYYOx5u7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:date :from:subject:to:cc:message-id:mime-version:content-type :content-transfer-encoding:user-agent:x-originalarrivaltime:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=rZiXhukdOtzyW7JW+6+xUSIEAIgn++ySWdLKEdFxiN8wod5f5bBcXMTtXePnaX9eVp dvkZ08w5iicEpXptHAb9ry+j/8bHoQEop1RbHXoosx8ToJ6+/JKMlP0dkAg5KhHIWDmG 2o2pWKSJDdUg7qa33lD+hHKTDgiKlcI9aIAhY= Received: by 10.114.148.1 with SMTP id v1mr793830wad.28.1240375978512; Tue, 21 Apr 2009 21:52:58 -0700 (PDT) Received: by 10.106.156.36 with SMTP id d36gr2224pre.0; Tue, 21 Apr 2009 21:52:58 -0700 (PDT) X-Sender: q1.kim@samsung.com X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.114.151.4 with SMTP id y4mr1588962wad.12.1240375977889; Tue, 21 Apr 2009 21:52:57 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gmr-mx.google.com with ESMTP id m37si3315981waf.0.2009.04.21.21.52.57; Tue, 21 Apr 2009 21:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of q1.kim@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of q1.kim@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=q1.kim@samsung.com Received: from epmmp2 (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0KIH007RTK6YVI@mailout2.samsung.com> for rtc-linux@googlegroups.com; Wed, 22 Apr 2009 13:52:10 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0KIH00CZ9K6YFB@mmp2.samsung.com> for rtc-linux@googlegroups.com; 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: [rtc-linux] 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 User-Agent: Thunderbird 2.0.0.21 (X11/20090318) X-OriginalArrivalTime: 22 Apr 2009 04:52:10.0057 (UTC) FILETIME=[183BEB90:01C9C306] Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com 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; }