All of lore.kernel.org
 help / color / mirror / Atom feed
* + drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch added to -mm tree
@ 2014-11-12 23:12 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-11-12 23:12 UTC (permalink / raw)
  To: hao.liu, Baohua.Song, a.zummo, mm-commits


The patch titled
     Subject: drivers/rtc/rtc-sirfsoc.c: add alarm_irq_enable support
has been added to the -mm tree.  Its filename is
     drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch
		echo and later at
		echo  http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: hao liu <hao.liu@csr.com>
Subject: drivers/rtc/rtc-sirfsoc.c: add alarm_irq_enable support

Add missed alarm_irq_enable() callback for CSR SiRFSoC RTCs.

Signed-off-by: hao liu <hao.liu@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/rtc/rtc-sirfsoc.c |   27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff -puN drivers/rtc/rtc-sirfsoc.c~drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support drivers/rtc/rtc-sirfsoc.c
--- a/drivers/rtc/rtc-sirfsoc.c~drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support
+++ a/drivers/rtc/rtc-sirfsoc.c
@@ -209,12 +209,37 @@ static int sirfsoc_rtc_ioctl(struct devi
 	}
 }
 
+static int sirfsoc_rtc_alarm_irq_enable(struct device *dev,
+		unsigned int enabled)
+{
+	unsigned long rtc_status_reg = 0x0;
+	struct sirfsoc_rtc_drv *rtcdrv;
+
+	rtcdrv = (struct sirfsoc_rtc_drv *)dev_get_drvdata(dev);
+
+	local_irq_disable();
+
+	rtc_status_reg = sirfsoc_rtc_iobrg_readl(
+				rtcdrv->rtc_base + RTC_STATUS);
+	if (enabled)
+		rtc_status_reg |= SIRFSOC_RTC_AL0E;
+	else
+		rtc_status_reg &= ~SIRFSOC_RTC_AL0E;
+
+	sirfsoc_rtc_iobrg_writel(rtc_status_reg, rtcdrv->rtc_base + RTC_STATUS);
+	local_irq_enable();
+
+	return 0;
+
+}
+
 static const struct rtc_class_ops sirfsoc_rtc_ops = {
 	.read_time = sirfsoc_rtc_read_time,
 	.set_time = sirfsoc_rtc_set_time,
 	.read_alarm = sirfsoc_rtc_read_alarm,
 	.set_alarm = sirfsoc_rtc_set_alarm,
-	.ioctl = sirfsoc_rtc_ioctl
+	.ioctl = sirfsoc_rtc_ioctl,
+	.alarm_irq_enable = sirfsoc_rtc_alarm_irq_enable
 };
 
 static irqreturn_t sirfsoc_rtc_irq_handler(int irq, void *pdata)
_

Patches currently in -mm which might be from hao.liu@csr.com are

drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-12 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 23:12 + drivers-rtc-rtc-sirfsocc-add-alarm_irq_enable-support.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.