diff options
author | Daniel Mack <zonque@gmail.com> | 2012-07-19 13:58:39 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-08-16 04:13:07 -0400 |
commit | 9020b7cc27439e23a0e993f79ef8632fea5e88d5 (patch) | |
tree | 427d9153b313aa5942a519a975a43ca47812f3a2 /drivers/rtc/rtc-pxa.c | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
RTC: add DT bindings to pxa-rtc
This patch adds generic device tree bindings to the PXA RTC driver.
Documentation for bindings were also added.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'drivers/rtc/rtc-pxa.c')
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index 0075c8fd93d8..f771b2ee4b18 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/of.h> | ||
31 | #include <linux/of_device.h> | ||
30 | 32 | ||
31 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
32 | 34 | ||
@@ -396,6 +398,14 @@ static int __exit pxa_rtc_remove(struct platform_device *pdev) | |||
396 | return 0; | 398 | return 0; |
397 | } | 399 | } |
398 | 400 | ||
401 | #ifdef CONFIG_OF | ||
402 | static struct of_device_id pxa_rtc_dt_ids[] = { | ||
403 | { .compatible = "marvell,pxa-rtc" }, | ||
404 | {} | ||
405 | }; | ||
406 | MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); | ||
407 | #endif | ||
408 | |||
399 | #ifdef CONFIG_PM | 409 | #ifdef CONFIG_PM |
400 | static int pxa_rtc_suspend(struct device *dev) | 410 | static int pxa_rtc_suspend(struct device *dev) |
401 | { | 411 | { |
@@ -425,6 +435,7 @@ static struct platform_driver pxa_rtc_driver = { | |||
425 | .remove = __exit_p(pxa_rtc_remove), | 435 | .remove = __exit_p(pxa_rtc_remove), |
426 | .driver = { | 436 | .driver = { |
427 | .name = "pxa-rtc", | 437 | .name = "pxa-rtc", |
438 | .of_match_table = of_match_ptr(pxa_rtc_dt_ids), | ||
428 | #ifdef CONFIG_PM | 439 | #ifdef CONFIG_PM |
429 | .pm = &pxa_rtc_pm_ops, | 440 | .pm = &pxa_rtc_pm_ops, |
430 | #endif | 441 | #endif |