Thread (1 message) 1 message, 1 author, 2016-06-21
DORMANTno replies

[PATCH 3/4] rtc: rv8803: add device tree compatible names

From: Dirk Behme <hidden>
Date: 2016-06-21 06:57:19
Also in: linux-rtc
Subsystem: real time clock (rtc) subsystem, the rest · Maintainers: Alexandre Belloni, Linus Torvalds

From: Knut Wohlrab <Knut.Wohlrab-V5te9oGctAVWk0Htik3J/w@public.gmane.org>

Add device tree compatible names for usage in a compatible
list of alternative RTC devices.

Signed-off-by: Knut Wohlrab <Knut.Wohlrab-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Oleksij Rempel <fixed-term.Oleksij.Rempel-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/rtc/rtc-rv8803.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index f623038..62baddd 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -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,
-- 
2.8.0

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help