lkml.org 
[lkml]   [2015]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] rtc-isl1208: add device tree support
Date
Add a basic device tree support for isl1208 driver

Signed-off-by: Jean-Baptiste Theou <jtheou@adeneo-embedded.us>
---
drivers/rtc/rtc-isl1208.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
index c3c549d..b47a3f9 100644
--- a/drivers/rtc/rtc-isl1208.c
+++ b/drivers/rtc/rtc-isl1208.c
@@ -692,6 +692,14 @@ isl1208_remove(struct i2c_client *client)
return 0;
}

+#ifdef CONFIG_OF
+static const struct of_device_id isl1208_dt_match[] = {
+ { .compatible = "isil,isl1208" },
+ { .compatible = "isil,isl1218" },
+ { },
+};
+#endif
+
static const struct i2c_device_id isl1208_id[] = {
{ "isl1208", 0 },
{ "isl1218", 0 },
@@ -702,6 +710,7 @@ MODULE_DEVICE_TABLE(i2c, isl1208_id);
static struct i2c_driver isl1208_driver = {
.driver = {
.name = "rtc-isl1208",
+ .of_match_table = of_match_ptr(isl1208_dt_match),
},
.probe = isl1208_probe,
.remove = isl1208_remove,
--
2.4.0


\
 
 \ /
  Last update: 2015-05-26 21:21    [W:0.028 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site