]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00179059 RTC: enable wakealarm attribute
authorFrank Li <Frank.Li@freescale.com>
Fri, 6 Apr 2012 04:58:40 +0000 (12:58 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:22 +0000 (08:34 +0200)
Set 10s wake alarm from now by below command

echo +10 > /sys/class/rtc/rtc0/wakealarm

Signed-off-by: Frank Li <Frank.Li@freescale.com>
drivers/rtc/rtc-snvs.c

index aa3dedb6b10fec8cd93c20e7a999a59bf210ef86..2051e8691a64f2295c762f5c3250c675791db659 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Freescale Semiconductor, Inc.
+ * Copyright (C) 2011-2012 Freescale Semiconductor, Inc.
  */
 
 /*
@@ -565,6 +565,10 @@ static int snvs_rtc_probe(struct platform_device *pdev)
        pdata->irq = platform_get_irq(pdev, 0);
        platform_set_drvdata(pdev, pdata);
 
+
+       /* Added to support sysfs wakealarm attribute */
+       pdev->dev.power.can_wakeup = 1;
+
        /* initialize glitch detect */
        __raw_writel(SNVS_LPPGDR_INIT, ioaddr + SNVS_LPPGDR);
        udelay(100);