aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2013-04-29 19:20:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:34 -0400
commit7c1b68d4e1d98e77234dfe1f3e15a24bbeef981a (patch)
treebf21aa71a23281fc5fc385dbae19c8765be2db65 /drivers/rtc
parent2fa76062bbff17fbc462c290ba9fe22cf23a4710 (diff)
drivers/rtc/rtc-at91rm9200.c: add DT support
Signed-off-by: Joachim Eastwood <manabian@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-at91rm9200.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index f07bd318260c..a654071f57df 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -28,6 +28,8 @@
28#include <linux/ioctl.h> 28#include <linux/ioctl.h>
29#include <linux/completion.h> 29#include <linux/completion.h>
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/of.h>
32#include <linux/of_device.h>
31 33
32#include <asm/uaccess.h> 34#include <asm/uaccess.h>
33 35
@@ -373,12 +375,19 @@ static int at91_rtc_resume(struct device *dev)
373 375
374static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume); 376static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume);
375 377
378static const struct of_device_id at91_rtc_dt_ids[] = {
379 { .compatible = "atmel,at91rm9200-rtc" },
380 { /* sentinel */ }
381};
382MODULE_DEVICE_TABLE(of, at91_rtc_dt_ids);
383
376static struct platform_driver at91_rtc_driver = { 384static struct platform_driver at91_rtc_driver = {
377 .remove = __exit_p(at91_rtc_remove), 385 .remove = __exit_p(at91_rtc_remove),
378 .driver = { 386 .driver = {
379 .name = "at91_rtc", 387 .name = "at91_rtc",
380 .owner = THIS_MODULE, 388 .owner = THIS_MODULE,
381 .pm = &at91_rtc_pm_ops, 389 .pm = &at91_rtc_pm_ops,
390 .of_match_table = of_match_ptr(at91_rtc_dt_ids),
382 }, 391 },
383}; 392};
384 393