aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Shubin <[email protected]>2023-08-25 11:43:26 +0300
committerAlexandre Belloni <[email protected]>2023-08-28 00:01:51 +0200
commit6ec3f5ec2eecabab065a39f5e04562c8c3c81ece (patch)
treef897e566aa31a3f8353e1116e655f1b78136ed0f
parenta5aeccabb53673331f78a97ce492ce6d01f1e036 (diff)
rtc: m48t86: add DT support for m48t86
Add OF ID match table. Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Nikita Shubin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
-rw-r--r--drivers/rtc/rtc-m48t86.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 481c9525b1dd..dd4a62e2d39c 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -11,6 +11,7 @@
*/
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/rtc.h>
#include <linux/platform_device.h>
#include <linux/bcd.h>
@@ -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,
};