rtc: m41t93: add device tree support

Add device tree support for m41t93 rtc by adding of_match_table.
Define compatible string - "st,m41t93" which can be used to instantiate
this rtc device via DT node.

Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Link: https://patch.msgid.link/060ef5c5adaa444d2c623aa8ce4c540fa19d0f95.1758379856.git.akhilesh@ee.iitb.ac.in
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Akhilesh Patil
2025-09-20 20:31:47 +05:30
committed by Alexandre Belloni
parent b70598b376
commit 081e3de28c

View File

@@ -191,9 +191,16 @@ static int m41t93_probe(struct spi_device *spi)
return 0;
}
static const struct of_device_id m41t93_dt_match[] = {
{ .compatible = "st,m41t93" },
{ }
};
MODULE_DEVICE_TABLE(of, m41t93_dt_match);
static struct spi_driver m41t93_driver = {
.driver = {
.name = "rtc-m41t93",
.of_match_table = m41t93_dt_match,
},
.probe = m41t93_probe,
};