Commit 2d79cf8a authored by Joseph Lo's avatar Joseph Lo Committed by Linus Torvalds

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: default avatarJoseph Lo <josephl@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Joseph Lo <josephl@nvidia.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5f243b9b
...@@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = { ...@@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = {
.alarm_irq_enable = tegra_rtc_alarm_irq_enable, .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) static int tegra_rtc_probe(struct platform_device *pdev)
{ {
struct tegra_rtc_info *info; struct tegra_rtc_info *info;
...@@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = { ...@@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = {
.driver = { .driver = {
.name = "tegra_rtc", .name = "tegra_rtc",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = tegra_rtc_dt_match,
}, },
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = tegra_rtc_suspend, .suspend = tegra_rtc_suspend,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment