From patchwork Mon Dec 29 03:55:11 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: matti.halme@nokia.com X-Patchwork-Id: 15940 X-Patchwork-Delegate: azummo-patchwork@towertech.it Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from yw-out-2122.google.com (yw-out-2122.google.com [74.125.46.24]) by ozlabs.org (Postfix) with ESMTP id 4C31BDDDF6 for ; Tue, 30 Dec 2008 01:59:31 +1100 (EST) Received: by yw-out-2122.google.com with SMTP id 7so1302413ywi.11 for ; Mon, 29 Dec 2008 06:59:29 -0800 (PST) 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:x-mimeole:content-class:mime-version:content-type :subject:date:message-id:x-ms-has-attach:x-ms-tnef-correlator :thread-topic:thread-index:from:to:cc:x-originalarrivaltime :x-nokia-av:reply-to:sender:precedence:x-google-loop:mailing-list :list-id:list-post:list-help:list-unsubscribe:x-beenthere-env :x-beenthere; bh=IoJG4bSwrfD+6otfpl8xbXIQQPeNuMlSrW6cY1dJGJM=; b=lW9hVffZw1ll2PlfeyxktMI5Scpi9vGBMkSTTNou3lDqLWdXYRnumBxOYWUcLzgd22 KAMgp6UZS2BeUk0KLoeYo/OIuRhvv1JIRFOBlZ2PU4HuvjQ+dZDr7C7rYNkVUy2OLKZM B8N3VZqECWBqG3u6JxsNZ2Xs+Y6qPeYc4ROmQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :x-mimeole:content-class:mime-version:content-type:subject:date :message-id:x-ms-has-attach:x-ms-tnef-correlator:thread-topic :thread-index:from:to:cc:x-originalarrivaltime:x-nokia-av:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=7A5QYTXLQY8B3p1bRLlE2G9wH10eY3BEnEeosBaszfghKmjQH+bH9OTxv3psDv0wSM OqO/QFRmZ3hYnfEMHHtRQuR8yrqBxuO//wUqpAMbtdjPOhDggU4Dx2y9hrQ+spFKjXpr ekJFEInt4BRdsKUbmjQn0tah7BMKLl/w5vHf4= Received: by 10.100.216.10 with SMTP id o10mr1208149ang.4.1230562766538; Mon, 29 Dec 2008 06:59:26 -0800 (PST) Received: by 10.176.158.42 with SMTP id g42gr1749yqe.0; Mon, 29 Dec 2008 06:59:26 -0800 (PST) X-Sender: matti.halme@nokia.com X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.90.83.18 with SMTP id g18mr4399459agb.29.1230562765028; Mon, 29 Dec 2008 06:59:25 -0800 (PST) Received: from mgw-mx03.nokia.com (smtp.nokia.com [192.100.122.230]) by mx.google.com with ESMTP id 22si998957yxr.4.2008.12.29.06.59.24; Mon, 29 Dec 2008 06:59:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of matti.halme@nokia.com designates 192.100.122.230 as permitted sender) client-ip=192.100.122.230; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of matti.halme@nokia.com designates 192.100.122.230 as permitted sender) smtp.mail=matti.halme@nokia.com Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id mBTEx2px003997; Mon, 29 Dec 2008 16:59:21 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Dec 2008 16:59:20 +0200 Received: from vaebe107.NOE.Nokia.com ([10.160.244.68]) by vaebh104.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Dec 2008 16:59:20 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Mime-Version: 1.0 Subject: [rtc-linux] [PATCH] Don't mask rtc-twl4030 alarm interrupts on shutdown Date: Mon, 29 Dec 2008 16:55:11 +0200 Message-ID: <043E6D9F43E2D14682729D3AE18163F3FD9B6C@vaebe107.NOE.Nokia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] Don't mask rtc-twl4030 alarm interrupts on shutdown Thread-Index: AclpxXLxFPC3FsaJQYegqe1hOBg6bg== From: To: , Cc: X-OriginalArrivalTime: 29 Dec 2008 14:59:20.0195 (UTC) FILETIME=[07325530:01C969C6] X-Nokia-AV: Clean 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 A triggering RTC alarm should be able to power on a device that has been powered off. This patch enables that on twl4030 by not masking the alarm interrupt at shutdown. Signed-off-by: Matti Halme --- drivers/rtc/rtc-twl4030.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-twl4030.c b/drivers/rtc/rtc-twl4030.c index abe87a4..f5f6a97 100644 --- a/drivers/rtc/rtc-twl4030.c +++ b/drivers/rtc/rtc-twl4030.c @@ -505,8 +505,9 @@ static int __devexit twl4030_rtc_remove(struct platform_device *pdev) static void twl4030_rtc_shutdown(struct platform_device *pdev) { - mask_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M | - BIT_RTC_INTERRUPTS_REG_IT_ALARM_M); + /* mask timer interrupts, but leave alarm interrupts on to enable + power-on when alarm is triggered */ + mask_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); } #ifdef CONFIG_PM