Skip to content

Commit 6ec3f5e

Browse files
maquefelalexandrebelloni
authored andcommitted
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>
1 parent a5aecca commit 6ec3f5e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/rtc/rtc-m48t86.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/module.h>
14+
#include <linux/mod_devicetable.h>
1415
#include <linux/rtc.h>
1516
#include <linux/platform_device.h>
1617
#include <linux/bcd.h>
@@ -269,9 +270,16 @@ static int m48t86_rtc_probe(struct platform_device *pdev)
269270
return 0;
270271
}
271272

273+
static const struct of_device_id m48t86_rtc_of_ids[] = {
274+
{ .compatible = "st,m48t86" },
275+
{ /* sentinel */ }
276+
};
277+
MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
278+
272279
static struct platform_driver m48t86_rtc_platform_driver = {
273280
.driver = {
274281
.name = "rtc-m48t86",
282+
.of_match_table = m48t86_rtc_of_ids,
275283
},
276284
.probe = m48t86_rtc_probe,
277285
};

0 commit comments

Comments
 (0)