drivers/rtc/rtc-tegra.c: convert to DT driver
authorJoseph Lo <josephl@nvidia.com>
Fri, 4 Jan 2013 23:34:45 +0000 (15:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Jan 2013 00:11:45 +0000 (16:11 -0800)
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>
drivers/rtc/rtc-tegra.c

index 5ba2f756a524b1e62bad5d101254a13e03be9359..c84ea6659f497fb32d67a8ec02f70e38a57055ce 100644 (file)
@@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = {
        .alarm_irq_enable = tegra_rtc_alarm_irq_enable,
 };
 
+static const struct of_device_id tegra_rtc_dt_match[] = {
+       { .compatible = "nvidia,tegra20-rtc", },
+       {}
+};
+MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
+
 static int tegra_rtc_probe(struct platform_device *pdev)
 {
        struct tegra_rtc_info *info;
@@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = {
        .driver         = {
                .name   = "tegra_rtc",
                .owner  = THIS_MODULE,
+               .of_match_table = tegra_rtc_dt_match,
        },
 #ifdef CONFIG_PM
        .suspend        = tegra_rtc_suspend,