aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-05-29 18:07:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 19:22:33 -0400
commit0108c4ff62a0ee324c58175ff6b7000865023498 (patch)
treee25434c28edbd078b9f70a3f154e7f0981e22306 /drivers/rtc
parent7c20342230ff370c397fc4a9c4c1e7a91964bb66 (diff)
rtc/spear: add Device Tree probing capability
SPEAr platforms now support DT and so must convert all drivers support DT. This patch adds DT probing support for rtc and updates its documentation too. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Cc: Stefan Roese <sr@denx.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Rajeev Kumar <rajeev-dlh.kumar@st.com> Cc: Rob Herring <robherring2@gmail.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-spear.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index e38da0dc4187..1f76320e545b 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -16,6 +16,7 @@
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/of.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/rtc.h> 21#include <linux/rtc.h>
21#include <linux/slab.h> 22#include <linux/slab.h>
@@ -519,6 +520,14 @@ static void spear_rtc_shutdown(struct platform_device *pdev)
519 clk_disable(config->clk); 520 clk_disable(config->clk);
520} 521}
521 522
523#ifdef CONFIG_OF
524static const struct of_device_id spear_rtc_id_table[] = {
525 { .compatible = "st,spear600-rtc" },
526 {}
527};
528MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
529#endif
530
522static struct platform_driver spear_rtc_driver = { 531static struct platform_driver spear_rtc_driver = {
523 .probe = spear_rtc_probe, 532 .probe = spear_rtc_probe,
524 .remove = __devexit_p(spear_rtc_remove), 533 .remove = __devexit_p(spear_rtc_remove),
@@ -527,6 +536,7 @@ static struct platform_driver spear_rtc_driver = {
527 .shutdown = spear_rtc_shutdown, 536 .shutdown = spear_rtc_shutdown,
528 .driver = { 537 .driver = {
529 .name = "rtc-spear", 538 .name = "rtc-spear",
539 .of_match_table = of_match_ptr(spear_rtc_id_table),
530 }, 540 },
531}; 541};
532 542