Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: m48t86: add DT support for m48t86

Add OF ID match table.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/lkml/20230601054549.10843-12-nikita.shubin@maquefel.me/
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Link: https://lore.kernel.org/r/20230823-m48t86_device_tree-v2-2-21ff275f949d@maquefel.me
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Nikita Shubin and committed by
Alexandre Belloni
6ec3f5ec a5aeccab

+8
+8
drivers/rtc/rtc-m48t86.c
··· 11 11 */ 12 12 13 13 #include <linux/module.h> 14 + #include <linux/mod_devicetable.h> 14 15 #include <linux/rtc.h> 15 16 #include <linux/platform_device.h> 16 17 #include <linux/bcd.h> ··· 270 269 return 0; 271 270 } 272 271 272 + static const struct of_device_id m48t86_rtc_of_ids[] = { 273 + { .compatible = "st,m48t86" }, 274 + { /* sentinel */ } 275 + }; 276 + MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids); 277 + 273 278 static struct platform_driver m48t86_rtc_platform_driver = { 274 279 .driver = { 275 280 .name = "rtc-m48t86", 281 + .of_match_table = m48t86_rtc_of_ids, 276 282 }, 277 283 .probe = m48t86_rtc_probe, 278 284 };