- get regs from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
 #include <linux/platform_device.h>
 #include <linux/bcd.h>
 #include <linux/io.h>
+#include <linux/of.h>
 
 #define M48T86_SEC             0x00
 #define M48T86_SECALRM         0x01
        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,
 };