From patchwork Sun Nov 28 18:31:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yauhen Kharuzhy X-Patchwork-Id: 73347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ww0-f56.google.com (mail-ww0-f56.google.com [74.125.82.56]) by ozlabs.org (Postfix) with ESMTP id 51CEBB70AF for ; Mon, 29 Nov 2010 05:40:16 +1100 (EST) Received: by wwi14 with SMTP id 14sf2784491wwi.11 for ; Sun, 28 Nov 2010 10:40:13 -0800 (PST) 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 :received:from:to:cc:subject:date:message-id:x-mailer :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=padW9wD2GBv4wN4tcS2ejulvG74LktAwPEyTk6ZoktA=; b=gY+aEV9fr60Pxe0xgh4y8Iuv/7NmZNg0kXDaABqmxqxDfDpPps1wpyO0cY0iE4G1yf KFFflZN9Fd/PepxHj8vw/Zuc/WrioNXql374EP2BK578Wj9WtNnBUmMhu5IwbX/f5jrL SDq90lUR2+yAXA4/5I6f7y+KMrMDs9CYD5pd8= 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-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=wcmmFp93y1+eDwwImkuGdhzrzKvKU0hYv2SYZUBRsStnlbfSNx2nyVBcjdSbfbblsT i0N2jhOImiTxA2bsiR0SWxIrC1d4iLm6BDdx2vBaRRCMhcn391Gh95Xix+paWpn1h7YU xTG6M4bdZB7NrLz2wo2vitcAMMVlUJQ8+Rr2Q= Received: by 10.216.140.24 with SMTP id d24mr1115662wej.3.1290969612411; Sun, 28 Nov 2010 10:40:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.14.125.12 with SMTP id y12ls510023eeh.0.p; Sun, 28 Nov 2010 10:40:11 -0800 (PST) Received: by 10.14.37.132 with SMTP id y4mr709728eea.20.1290969611396; Sun, 28 Nov 2010 10:40:11 -0800 (PST) Received: by 10.14.37.132 with SMTP id y4mr709727eea.20.1290969611369; Sun, 28 Nov 2010 10:40:11 -0800 (PST) Received: from mail-ew0-f45.google.com (mail-ew0-f45.google.com [209.85.215.45]) by gmr-mx.google.com with ESMTP id z15si1401571eeh.2.2010.11.28.10.40.10; Sun, 28 Nov 2010 10:40:10 -0800 (PST) Received-SPF: pass (google.com: domain of jekhor@gmail.com designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by ewy10 with SMTP id 10so1580128ewy.32 for ; Sun, 28 Nov 2010 10:40:10 -0800 (PST) Received: by 10.213.13.15 with SMTP id z15mr1691628ebz.67.1290969610178; Sun, 28 Nov 2010 10:40:10 -0800 (PST) Received: from localhost.localdomain ([86.57.195.155]) by mx.google.com with ESMTPS id w20sm4287799eeh.0.2010.11.28.10.40.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Nov 2010 10:40:09 -0800 (PST) Received: from jek by localhost.localdomain with local (Exim 4.72) (envelope-from ) id 1PMm2X-0002gV-5C; Sun, 28 Nov 2010 20:31:57 +0200 From: Yauhen Kharuzhy To: Alessandro Zummo Cc: rtc-linux@googlegroups.com, Ben Dooks , linux-arm-kernel@lists.infradead.org, Kukjin Kim , Ivan Kuten , Yauhen Kharuzhy Subject: [rtc-linux] [PATCH 10/10] RTC S3C: Fix type of s3c_rtc_setaie() Date: Sun, 28 Nov 2010 20:31:55 +0200 Message-Id: <1290969115-10291-1-git-send-email-jekhor@gmail.com> X-Mailer: git-send-email 1.7.2.3 X-Original-Sender: jekhor@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jekhor@gmail.com designates 209.85.215.45 as permitted sender) smtp.mail=jekhor@gmail.com; dkim=pass (test mode) header.i=@gmail.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: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Change s3c_rtc_setaie() declaration in accordance with rtc_class_ops structure declaration. Signed-off-by: Yauhen Kharuzhy --- arch/arm/mach-s3c2412/Kconfig | 7 +++++++ arch/arm/mach-s3c2412/Makefile | 3 ++- arch/arm/mach-s3c2416/Kconfig | 1 + drivers/rtc/rtc-s3c.c | 8 +++++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index fa2e5bf..6983cb4 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig @@ -28,9 +28,16 @@ config S3C2412_DMA config S3C2412_PM bool + select S3C2412_PM_SLEEP help Internal config node to apply S3C2412 power management +config S3C2412_PM_SLEEP + bool + help + Internal config node to apply sleep for S3C2412 power management. + Can be selected by another SoCs with similar sleep procedure. + # Note, the S3C2412 IOtiming support is in plat-s3c24xx config S3C2412_CPUFREQ diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile index 530ec46..6c48a91 100644 --- a/arch/arm/mach-s3c2412/Makefile +++ b/arch/arm/mach-s3c2412/Makefile @@ -14,7 +14,8 @@ obj-$(CONFIG_CPU_S3C2412) += irq.o obj-$(CONFIG_CPU_S3C2412) += clock.o obj-$(CONFIG_CPU_S3C2412) += gpio.o obj-$(CONFIG_S3C2412_DMA) += dma.o -obj-$(CONFIG_S3C2412_PM) += pm.o sleep.o +obj-$(CONFIG_S3C2412_PM) += pm.o +obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep.o obj-$(CONFIG_S3C2412_CPUFREQ) += cpu-freq.o # Machine support diff --git a/arch/arm/mach-s3c2416/Kconfig b/arch/arm/mach-s3c2416/Kconfig index 2eaadcf..69b48a7 100644 --- a/arch/arm/mach-s3c2416/Kconfig +++ b/arch/arm/mach-s3c2416/Kconfig @@ -27,6 +27,7 @@ config S3C2416_DMA config S3C2416_PM bool + select S3C2412_PM_SLEEP help Internal config node to apply S3C2416 power management diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index cf953ec..4101522 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -77,7 +77,7 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id) } /* Update control registers */ -static void s3c_rtc_setaie(int to) +static int s3c_rtc_setaie(struct device *dev, unsigned int to) { unsigned int tmp; @@ -89,6 +89,8 @@ static void s3c_rtc_setaie(int to) tmp |= S3C2410_RTCALM_ALMEN; writeb(tmp, s3c_rtc_base + S3C2410_RTCALM); + + return 0; } static int s3c_rtc_setpie(struct device *dev, int enabled) @@ -308,7 +310,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) writeb(alrm_en, base + S3C2410_RTCALM); - s3c_rtc_setaie(alrm->enabled); + s3c_rtc_setaie(dev, alrm->enabled); return 0; } @@ -440,7 +442,7 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev) rtc_device_unregister(rtc); s3c_rtc_setpie(&dev->dev, 0); - s3c_rtc_setaie(0); + s3c_rtc_setaie(&dev->dev, 0); clk_disable(rtc_clk); clk_put(rtc_clk);