aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorJoseph Lo <josephl@nvidia.com>2013-01-04 18:34:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-04 19:11:45 -0500
commit2d79cf8a9dfbaef1e57c88a709689577c8482a17 (patch)
tree1566584740dff083683edf1629caf3311b3ba1fd /drivers/rtc
parent5f243b9b46a22e5790dbbc36f574c2417af49a41 (diff)
drivers/rtc/rtc-tegra.c: convert to DT driver
After Kernel 3.7, the Tegra device will only support booting with DT. The legacy Tegra RTC platform driver will not work anymore. This patch converts the driver to support DT. Signed-off-by: Joseph Lo <josephl@nvidia.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Joseph Lo <josephl@nvidia.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-tegra.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 5ba2f756a524..c84ea6659f49 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = {
303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable, 303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable,
304}; 304};
305 305
306static const struct of_device_id tegra_rtc_dt_match[] = {
307 { .compatible = "nvidia,tegra20-rtc", },
308 {}
309};
310MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
311
306static int tegra_rtc_probe(struct platform_device *pdev) 312static int tegra_rtc_probe(struct platform_device *pdev)
307{ 313{
308 struct tegra_rtc_info *info; 314 struct tegra_rtc_info *info;
@@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = {
440 .driver = { 446 .driver = {
441 .name = "tegra_rtc", 447 .name = "tegra_rtc",
442 .owner = THIS_MODULE, 448 .owner = THIS_MODULE,
449 .of_match_table = tegra_rtc_dt_match,
443 }, 450 },
444#ifdef CONFIG_PM 451#ifdef CONFIG_PM
445 .suspend = tegra_rtc_suspend, 452 .suspend = tegra_rtc_suspend,