Skip to content

Commit 2d79cf8

Browse files
joseph-lo-nvtwtorvalds
authored andcommitted
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>
1 parent 5f243b9 commit 2d79cf8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/rtc/rtc-tegra.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = {
303303
.alarm_irq_enable = tegra_rtc_alarm_irq_enable,
304304
};
305305

306+
static const struct of_device_id tegra_rtc_dt_match[] = {
307+
{ .compatible = "nvidia,tegra20-rtc", },
308+
{}
309+
};
310+
MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
311+
306312
static int tegra_rtc_probe(struct platform_device *pdev)
307313
{
308314
struct tegra_rtc_info *info;
@@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = {
440446
.driver = {
441447
.name = "tegra_rtc",
442448
.owner = THIS_MODULE,
449+
.of_match_table = tegra_rtc_dt_match,
443450
},
444451
#ifdef CONFIG_PM
445452
.suspend = tegra_rtc_suspend,

0 commit comments

Comments
 (0)