@@ -18,6 +18,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/rtc.h>
+#include <linux/of.h>
#define RV8803_SEC 0x00
#define RV8803_MIN 0x01
@@ -520,9 +521,19 @@ static const struct i2c_device_id rv8803_id[] = {
};
MODULE_DEVICE_TABLE(i2c, rv8803_id);
+#ifdef CONFIG_OF
+static const struct of_device_id rv8803_of_match[] = {
+ { .compatible = "mc,rv8803", },
+ { .compatible = "epson,rx8900", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, rv8803_of_match);
+#endif
+
static struct i2c_driver rv8803_driver = {
.driver = {
.name = "rtc-rv8803",
+ .of_match_table = of_match_ptr(rv8803_of_match),
},
.probe = rv8803_probe,
.remove = rv8803_remove,