From 0108c4ff62a0ee324c58175ff6b7000865023498 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 29 May 2012 15:07:35 -0700 Subject: 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 Cc: Stefan Roese Cc: Arnd Bergmann Cc: Alessandro Zummo Cc: Rajeev Kumar Cc: Rob Herring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-spear.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/rtc/rtc-spear.c') 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 @@ #include #include #include +#include #include #include #include @@ -519,6 +520,14 @@ static void spear_rtc_shutdown(struct platform_device *pdev) clk_disable(config->clk); } +#ifdef CONFIG_OF +static const struct of_device_id spear_rtc_id_table[] = { + { .compatible = "st,spear600-rtc" }, + {} +}; +MODULE_DEVICE_TABLE(of, spear_rtc_id_table); +#endif + static struct platform_driver spear_rtc_driver = { .probe = spear_rtc_probe, .remove = __devexit_p(spear_rtc_remove), @@ -527,6 +536,7 @@ static struct platform_driver spear_rtc_driver = { .shutdown = spear_rtc_shutdown, .driver = { .name = "rtc-spear", + .of_match_table = of_match_ptr(spear_rtc_id_table), }, }; -- cgit v1.2.3