diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 39cfd2e..69e9389 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include @@ -71,6 +73,17 @@ struct sam9_rtc { #define gpbr_writel(rtc, val) \ __raw_writel((val), (rtc)->gpbr) +#ifdef CONFIG_OF +static const struct of_device_id at91sam9_rtc_dt_ids[] = { + { .compatible = "atmel,at91sam9-rtc" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, at91sam9_rtc_dt_ids); +#else +#define at91sam9_rtc_dt_ids NULL +#endif /* CONFIG_OF */ + + /* * Read current time and date in RTC */ @@ -470,6 +483,7 @@ static struct platform_driver at91_rtc_driver = { .driver = { .name = "rtc-at91sam9", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(at91sam9_rtc_dt_ids), }, };