From 18917ce5203d14fde16542aaa9697121562a5f2e Mon Sep 17 00:00:00 2001 From: Nikita Shubin Date: Sun, 14 Mar 2021 12:41:10 +0300 Subject: [PATCH] rtc: ep93xx: add DT support for Cirrus EP93xx - Find register range from the device tree. Signed-off-by: Nikita Shubin --- drivers/rtc/rtc-ep93xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index acae7f16808f7..f3350fcb20bfc 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -148,9 +149,18 @@ static int ep93xx_rtc_probe(struct platform_device *pdev) return devm_rtc_register_device(ep93xx_rtc->rtc); } +#ifdef CONFIG_OF +static const struct of_device_id ep93xx_rtc_of_ids[] = { + { .compatible = "cirrus,ep93xx-rtc" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_rtc_of_ids); +#endif + static struct platform_driver ep93xx_rtc_driver = { .driver = { .name = "ep93xx-rtc", + .of_match_table = of_match_ptr(ep93xx_rtc_of_ids), }, .probe = ep93xx_rtc_probe, }; -- 2.30.2