From patchwork Thu Nov 8 14:37:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 197843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-f184.google.com (mail-ob0-f184.google.com [209.85.214.184]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id B34092C00BA for ; Fri, 9 Nov 2012 01:38:09 +1100 (EST) Received: by mail-ob0-f184.google.com with SMTP id uz6sf1795406obc.11 for ; Thu, 08 Nov 2012 06:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=j8/zJc0pLmEVWFU/cP9BAedruZNDjrmr70vxci24bgw=; b=kl1LROIJYbviNnvjxoXUv460T1BzsL4uGM7lkDszr83hXWnDOhKgTdC94ANMcIjRB6 r/c8J+rXYF281YBxPF6AKTpz36ZpxWt7QRGbJWvbA20eWpWlEXEQFyUKwhcl1/dNmPSc GygoslsQ7guMGtSJMtaHk3jq6wNl36iZLg0og/eVmsYdz3zxePdkNW3RHeL1C9RH03HY LuM+el8y+8MBMY6C+M2eAEC8dmkR9pXtxpPlOirjg9QQdOvHgf+RL7rPChWdL7jsDlpl +QsuLhK7jaOhcZbRAD4tSOlJkLM3Z4T1oa/U9HVb92xaqJdufQG5pkq3aGxxMMyd+MGH 0riQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references :x-gm-message-state:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=j8/zJc0pLmEVWFU/cP9BAedruZNDjrmr70vxci24bgw=; b=nytG+1b3bO+kwz3A45DCSNMFbw6BR0eM2e3eALjPDtdRBApGedM0OlE3YlB4tBNxDs OUmNUl8aaeyINwSupLT0oazXL0q4PeyBuQ2mfFacN5z0m2K+Fa0tV8Q4OYdl03dq0tX8 BXa+K26/w09QwbaVaANAHnEzV8cd4+erEaWbcW0vHpJY9W21VgqGiOKHR/IbO+D+b0OH fkeCS2is1my7IKEGTzagTgZV98554VTvTYpRJKvsqysB2mgxO8bGzo22A+8vpbjB3EWu pryg5Qv6QrXVlbNpK09Ei5SBrGjlQ/LMg2LbxmA3B309Z1IobLrT/fGPb9MWhX7RB5gC 7ptQ== Received: by 10.50.45.226 with SMTP id q2mr11075237igm.0.1352385486864; Thu, 08 Nov 2012 06:38:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.140.40 with SMTP id rd8ls17466467igb.2.canary; Thu, 08 Nov 2012 06:38:06 -0800 (PST) Received: by 10.66.90.37 with SMTP id bt5mr3354365pab.40.1352385485879; Thu, 08 Nov 2012 06:38:05 -0800 (PST) Received: by 10.66.90.37 with SMTP id bt5mr3354364pab.40.1352385485868; Thu, 08 Nov 2012 06:38:05 -0800 (PST) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by gmr-mx.google.com with ESMTPS id uz6si6186624pbc.0.2012.11.08.06.38.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 06:38:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.41; Received: by mail-pb0-f41.google.com with SMTP id rq2so2264849pbb.14 for ; Thu, 08 Nov 2012 06:38:05 -0800 (PST) Received: by 10.66.73.226 with SMTP id o2mr16717162pav.83.1352385485783; Thu, 08 Nov 2012 06:38:05 -0800 (PST) Received: from localhost ([122.167.75.112]) by mx.google.com with ESMTPS id ty4sm16029048pbc.57.2012.11.08.06.38.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 06:38:04 -0800 (PST) From: Viresh Kumar To: akpm@linux-foundation.org Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, a.zummo@towertech.it, spear-devel@list.st.com, Deepak Sikri Subject: [rtc-linux] [PATCH 3/3] rtc: rtc-spear: Provide flag for no support of UIE mode Date: Thu, 8 Nov 2012 20:07:41 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkZjQ9Bse2nZXpUIFLR5X0kDBRHZRsdF4XIW32QlzKmfNtvLZdxwM626Z7udGXy/kIxw2pM X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) smtp.mail=viresh.kumar@linaro.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , From: Deepak Sikri The applciations can set the RTC hardware to trigger interrupts in one of three modes: * AIE: Alarm interrupt * UIE: Update interrupt (ie: once per second) * PIE: Periodic interrupt (sub-second irqs) The above defined 3 modes are to be supported in the RTC HW in form of interrupts. The SPEAr RTC hardware does not support the later two modes. There have been refinements in the RTC core in mainline related to use of timer queue infrastructure to manage events in RTC. Please refer the below mentioned patch for details: * RTC: Rework RTC code to use timerqueue for events * SHA ID: 6610e0893b8bc6f59b14fed7f089c5997f035f88 There have been provisions added to support hardware that do not have support the UIE mode. Please refer the following patch. * rtc: Provide flag for rtc devices that don't support UIE * SHA ID: 4a649903f91232d02284d53724b0a45728111767 The patch makes use of the provision defined in the above patch to update the hardware status of UIE mode. Signed-off-by: Deepak Sikri --- drivers/rtc/rtc-spear.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 990de02..0c4805c 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -417,6 +417,8 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev) goto err_disable_clock; } + config->rtc->uie_unsupported = 1; + if (!device_can_wakeup(&pdev->dev)) device_init_wakeup(&pdev->dev, 1);