aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-09-17 14:20:21 -0400
committerJohn Stultz <john.stultz@linaro.org>2013-09-18 17:37:50 -0400
commit07783397c6e3757de805bda5e1139a9e47aa7d74 (patch)
tree2b93e36738cc48bbc27fdf4c9d1ae9bb951c8873
parent233bcb411cd32d15c4d04271fa06ca8f2dc24eb8 (diff)
rtc: rtc-pl031: Set wakeup flag prior to registering rtcdev
In some recent testing, I noticed the CLOCK_REALTIME_ALARM clockid wasn't functioning on my vexpress qemu environment. Looking into it I noticed the pl031 rtc driver doesn't set the wakeup flag on the device until after registering the device with the RTC subsystem. This causes the alarmtimer subsystem to not see the pl031 driver as a valid backing device, and that resuls in alarm clockids getting ENOTSUPP errors. Thus be sure to set the wakeup flag on the device prior to registering the rtcdev so the pl031 rtc driver can be used as the backing alarmtimer device. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: "Jon Medhurst (Tixy)" <tixy@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--drivers/rtc/rtc-pl031.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 0f0609b1aa2c..e3b25712b659 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -371,6 +371,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
371 } 371 }
372 } 372 }
373 373
374 device_init_wakeup(&adev->dev, 1);
374 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops, 375 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
375 THIS_MODULE); 376 THIS_MODULE);
376 if (IS_ERR(ldata->rtc)) { 377 if (IS_ERR(ldata->rtc)) {
@@ -384,8 +385,6 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
384 goto out_no_irq; 385 goto out_no_irq;
385 } 386 }
386 387
387 device_init_wakeup(&adev->dev, 1);
388
389 return 0; 388 return 0;
390 389
391out_no_irq: 390out_no_irq: