diff options
author | Wei Ni <wni@nvidia.com> | 2011-10-19 13:29:49 +0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:50:10 -0800 |
commit | e99fab69b510bdc8db598130c1edac7cfec07e1a (patch) | |
tree | ca30743223b8f3ddfdd4e4e61d0846d2b263deea /drivers/rtc | |
parent | 2200829acd4bd9560179f06052ffcf9a3746784f (diff) |
rtc: tps6586x: Fix for proper wakealarm
In the driver probe function, call device_init_wakeup() before
registering rtc device, so that wakealarm sysfs will be created.
BUG=889820
Change-Id: I957fdffb02cd7e43dd96db0794e2e9f8dc7bd3ee
Signed-off-by: Wei Ni <wni@nvidia.com>
Reviewed-on: http://git-master/r/58937
Reviewed-by: Allen Martin <amartin@nvidia.com>
Reviewed-on: http://git-master/r/63244
Rebase-Id: R9e078974bd9e773443b19492b83d25694f4582c2
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-tps6586x.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 8415993e98f7..c41edabf0b2c 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -304,6 +304,9 @@ static int __devinit tps6586x_rtc_probe(struct platform_device *pdev) epoch->hour, epoch->min, epoch->sec); dev_set_drvdata(&pdev->dev, rtc); + + device_init_wakeup(&pdev->dev, 1); + rtc->rtc = rtc_device_register("tps6586x-rtc", &pdev->dev, &tps6586x_rtc_ops, THIS_MODULE); @@ -331,7 +334,6 @@ static int __devinit tps6586x_rtc_probe(struct platform_device *pdev) dev_warn(&pdev->dev, "unable to request IRQ(%d)\n", rtc->irq); rtc->irq = -1; } else { - device_init_wakeup(&pdev->dev, 1); enable_irq_wake(rtc->irq); disable_irq(rtc->irq); } @@ -342,6 +344,7 @@ static int __devinit tps6586x_rtc_probe(struct platform_device *pdev) fail: if (!IS_ERR_OR_NULL(rtc->rtc)) rtc_device_unregister(rtc->rtc); + device_init_wakeup(&pdev->dev, 0); kfree(rtc); return err; } |