From: Nikita Shubin Date: Fri, 25 Aug 2023 08:43:26 +0000 (+0300) Subject: rtc: m48t86: add DT support for m48t86 X-Git-Tag: v6.6.17~3968^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ec3f5ec2eecabab065a39f5e04562c8c3c81ece;p=platform%2Fkernel%2Flinux-rpi.git rtc: m48t86: add DT support for m48t86 Add OF ID match table. Acked-by: Arnd Bergmann Reviewed-by: Linus Walleij Link: https://lore.kernel.org/lkml/20230601054549.10843-12-nikita.shubin@maquefel.me/ Signed-off-by: Nikita Shubin Link: https://lore.kernel.org/r/20230823-m48t86_device_tree-v2-2-21ff275f949d@maquefel.me Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 481c952..dd4a62e 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -269,9 +270,16 @@ static int m48t86_rtc_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id m48t86_rtc_of_ids[] = { + { .compatible = "st,m48t86" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids); + static struct platform_driver m48t86_rtc_platform_driver = { .driver = { .name = "rtc-m48t86", + .of_match_table = m48t86_rtc_of_ids, }, .probe = m48t86_rtc_probe, };