From patchwork Tue Mar 16 20:20:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 47900 Return-Path: <33-ifSwcTCbMdabefTgWXXikhhmlrlmXfl.VhfkmV-ebgnqZhhZeXZkhnil.Vhf@groups.bounces.google.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vw0-f56.google.com (mail-vw0-f56.google.com [209.85.212.56]) by ozlabs.org (Postfix) with ESMTP id BE799B7CF4 for ; Wed, 17 Mar 2010 07:24:01 +1100 (EST) Received: by vws5 with SMTP id 5sf113411vws.11 for ; Tue, 16 Mar 2010 13:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:received:received :from:to:cc:subject:date:message-id:x-mailer :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type; bh=v7Nduqy4pgJYM2o8Sw1ZI3JgZgKVMhQGZgh8sI+PDXM=; b=rZOF9flDVu1yBJxPBND/Ua1TFgfLit9co0kZey6Tl/2graAIw3EIWU+QHmN4B2HoWm GasWK9THhswN3K3bHPusChPgdis7Y+nnIWvcUS3u1H3iLfzqVXsg4wRdadByBCg9dV5y w0OcxF7dE0tebjx5uD7xAGP/MvqiFr5binqnk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:x-original-authentication-results :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:x-thread-url:x-message-url:sender :list-subscribe:list-unsubscribe:content-type; b=prwX+uEA/E8jPlfvq2l6DJS4aIJpMKifc1dOJNz69o/QRnvjf/ga8pF4HR6TPwLbMG /FFSWomsVaSC016DXkP/BDMVp/Na1SHyX3AGOYh3t1d3lsEznxITp4IfHQ2FFtaVkPiO ubZLawa1JAfvtIUclm8VA1z8PDl8ZQPlSIjwk= Received: by 10.220.107.101 with SMTP id a37mr179480vcp.43.1268771039489; Tue, 16 Mar 2010 13:23:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.220.80.31 with SMTP id r31ls20105vck.3.p; Tue, 16 Mar 2010 13:23:58 -0700 (PDT) Received: by 10.220.64.213 with SMTP id f21mr3802vci.22.1268771035019; Tue, 16 Mar 2010 13:23:55 -0700 (PDT) Received: by 10.220.64.213 with SMTP id f21mr3777vci.22.1268771032012; Tue, 16 Mar 2010 13:23:52 -0700 (PDT) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by gmr-mx.google.com with ESMTP id 30si5701vws.0.2010.03.16.13.23.51; Tue, 16 Mar 2010 13:23:51 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.92.24 is neither permitted nor denied by best guess record for domain of khilman@deeprootsystems.com) client-ip=74.125.92.24; Received: by qw-out-2122.google.com with SMTP id 5so57684qwd.11 for ; Tue, 16 Mar 2010 13:23:51 -0700 (PDT) Received: by 10.224.44.193 with SMTP id b1mr4345qaf.295.1268770857423; Tue, 16 Mar 2010 13:20:57 -0700 (PDT) Received: from localhost (deeprootsystems.com [216.254.16.51]) by mx.google.com with ESMTPS id 21sm5601641iwn.15.2010.03.16.13.20.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 13:20:56 -0700 (PDT) From: Kevin Hilman To: rtc-linux@googlegroups.com Cc: Sekhar Nori , Paul Gortmaker , Alessandro Zummo , Kevin Hilman , Tony Lindgren , Andrew Morton , Jiri Kosina , linux-kernel@vger.kernel.org Subject: [rtc-linux] [PATCH] rtc: omap: let device wakeup capability be configured from chip init logic Date: Tue, 16 Mar 2010 13:20:54 -0700 Message-Id: <1268770854-5530-1-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.0.2 X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 74.125.92.24 is neither permitted nor denied by best guess record for domain of khilman@deeprootsystems.com) smtp.mail=khilman@deeprootsystems.com X-Original-Sender: khilman@deeprootsystems.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rtc-linux/t/3e95e51822c966f X-Message-Url: http://groups.google.com/group/rtc-linux/msg/4c4635e37f853a0 Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , From: Sekhar Nori The rtc-omap driver currently hardcodes the RTC wakeup capability to be "not capable". While this seems to be true for existing OMAP1 boards which are not wired for this, the DA850/OMAP-L138 SoC, the RTC can always be wake up source from its "deep sleep" mode. This patch lets the wakeup capability to be set from platform data and does not override the setting from the driver. For DA850/OMAP-L138, this is done from arch/arm/mach-davinci/devices-da8xx.c:da8xx_register_rtc() Note that this patch does not change the behavior on any existing OMAP1 board since the platform device registration sets the wakeup capability to 0 by default. Signed-off-by: Sekhar Nori Signed-off-by: Kevin Hilman --- Alessandro, with your ack, I can merge this one as well via the davinci tree. drivers/rtc/rtc-omap.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 64d9727..73377b0 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -34,7 +34,8 @@ * Board-specific wiring options include using split power mode with * RTC_OFF_NOFF used as the reset signal (so the RTC won't be reset), * and wiring RTC_WAKE_INT (so the RTC alarm can wake the system from - * low power modes). See the BOARD-SPECIFIC CUSTOMIZATION comment. + * low power modes) for OMAP1 boards (OMAP-L138 has this built into + * the SoC). See the BOARD-SPECIFIC CUSTOMIZATION comment. */ #define OMAP_RTC_BASE 0xfffb4800 @@ -401,16 +402,17 @@ static int __init omap_rtc_probe(struct platform_device *pdev) /* BOARD-SPECIFIC CUSTOMIZATION CAN GO HERE: * - * - Boards wired so that RTC_WAKE_INT does something, and muxed - * right (W13_1610_RTC_WAKE_INT is the default after chip reset), - * should initialize the device wakeup flag appropriately. + * - Device wake-up capability setting should come through chip + * init logic. OMAP1 boards should initialize the "wakeup capable" + * flag in the platform device if the board is wired right for + * being woken up by RTC alarm. For OMAP-L138, this capability + * is built into the SoC by the "Deep Sleep" capability. * * - Boards wired so RTC_ON_nOFF is used as the reset signal, * rather than nPWRON_RESET, should forcibly enable split * power mode. (Some chip errata report that RTC_CTRL_SPLIT * is write-only, and always reads as zero...) */ - device_init_wakeup(&pdev->dev, 0); if (new_ctrl & (u8) OMAP_RTC_CTRL_SPLIT) pr_info("%s: split power mode\n", pdev->name);