summaryrefslogtreecommitdiffstats
path: root/rtc-of_match_table.patch
blob: 3c63221207c8a83fbeaae3821a254c85a5647467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
From cfc03ba555a4a828d650e560b4b13e42665de77c Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 20:09:41 +0200
Subject: [PATCH 1/5] Add of_match_table section for ti,tps6586x-rtc driver

---
 drivers/rtc/rtc-tps6586x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
index 426901c..fc8af05 100644
--- a/drivers/rtc/rtc-tps6586x.c
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -26,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/mfd/tps6586x.h>
 #include <linux/module.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/rtc.h>
@@ -247,6 +248,14 @@ static irqreturn_t tps6586x_rtc_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id tps6586x_rtc_dt_match[] = {
+	{ .compatible = "ti,tps6586x-rtc", },
+	{}
+};
+MODULE_DEVICE_TABLE(of, tps6586x_rtc_dt_match);
+#endif
+
 static int tps6586x_rtc_probe(struct platform_device *pdev)
 {
 	struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
@@ -338,6 +347,7 @@ static struct platform_driver tps6586x_rtc_driver = {
 	.driver	= {
 		.name	= "tps6586x-rtc",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(tps6586x_rtc_dt_match),
 		.pm	= &tps6586x_pm_ops,
 	},
 	.probe	= tps6586x_rtc_probe,
-- 
1.8.3.1

From edf63fdece0c2e64dc5e2b821a0108d97f259262 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 20:32:59 +0200
Subject: [PATCH 2/5] Add of_match_table section for ti,tps65910-rtc driver

---
 drivers/rtc/rtc-tps65910.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 7af0020..7439480 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -21,6 +21,7 @@
 #include <linux/types.h>
 #include <linux/rtc.h>
 #include <linux/bcd.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/tps65910.h>
@@ -221,6 +222,14 @@ static const struct rtc_class_ops tps65910_rtc_ops = {
 	.alarm_irq_enable = tps65910_rtc_alarm_irq_enable,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id tps65910_rtc_dt_match[] = {
+	{ .compatible = "ti,tps65910-rtc", },
+	{}
+};
+MODULE_DEVICE_TABLE(of, tps65910_rtc_dt_match);
+#endif
+
 static int tps65910_rtc_probe(struct platform_device *pdev)
 {
 	struct tps65910 *tps65910 = NULL;
@@ -327,6 +336,7 @@ static struct platform_driver tps65910_rtc_driver = {
 	.remove		= tps65910_rtc_remove,
 	.driver		= {
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(tps65910_rtc_dt_match),
 		.name	= "tps65910-rtc",
 		.pm	= &tps65910_rtc_pm_ops,
 	},
-- 
1.8.3.1

From 61234bcffd07424d64a01bcf352f4454203bcdd9 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:33:44 +0200
Subject: [PATCH 3/5] Add of_match_table section for emmicro,em3027 driver

---
 drivers/rtc/rtc-em3027.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-em3027.c b/drivers/rtc/rtc-em3027.c
index fccf366..3528eac 100644
--- a/drivers/rtc/rtc-em3027.c
+++ b/drivers/rtc/rtc-em3027.c
@@ -15,6 +15,7 @@
 #include <linux/rtc.h>
 #include <linux/bcd.h>
 #include <linux/module.h>
+#include <linux/of_device.h>
 
 /* Registers */
 #define EM3027_REG_ON_OFF_CTRL	0x00
@@ -113,6 +114,14 @@ static const struct rtc_class_ops em3027_rtc_ops = {
 	.set_time = em3027_set_time,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id of_em3027_rtc_match[] = {
+	{ .compatible = "emmicro,em3027", },
+	{}
+};
+MODULE_DEVICE_TABLE(of, of_em3027_rtc_match);
+#endif
+
 static int em3027_probe(struct i2c_client *client,
 			const struct i2c_device_id *id)
 {
@@ -138,7 +147,9 @@ static struct i2c_device_id em3027_id[] = {
 
 static struct i2c_driver em3027_driver = {
 	.driver = {
-		   .name = "rtc-em3027",
+		.name = "rtc-em3027",
+		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(of_em3027_rtc_match),
 	},
 	.probe = &em3027_probe,
 	.id_table = em3027_id,
-- 
1.8.3.1

From f7bea871337e14efdd55b11f9721492ada5655b0 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:39:04 +0200
Subject: [PATCH 4/5] Add of_match_table section for ti,tps80031-rtc driver

---
 drivers/rtc/rtc-tps80031.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c
index 3e400dc..4a190c2 100644
--- a/drivers/rtc/rtc-tps80031.c
+++ b/drivers/rtc/rtc-tps80031.c
@@ -30,6 +30,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mfd/tps80031.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/rtc.h>
@@ -233,6 +234,14 @@ static const struct rtc_class_ops tps80031_rtc_ops = {
 	.alarm_irq_enable = tps80031_rtc_alarm_irq_enable,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id tps80031_rtc_dt_match[] = {
+	{ .compatible = "ti,tps80031-rtc", },
+	{}
+};
+MODULE_DEVICE_TABLE(of, tps80031_rtc_dt_match);
+#endif
+
 static int tps80031_rtc_probe(struct platform_device *pdev)
 {
 	struct tps80031_rtc *rtc;
@@ -325,6 +334,7 @@ static struct platform_driver tps80031_rtc_driver = {
 	.driver	= {
 		.name	= "tps80031-rtc",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(tps80031_rtc_dt_match),
 		.pm	= &tps80031_pm_ops,
 	},
 	.probe	= tps80031_rtc_probe,
-- 
1.8.3.1

From 43d7ad405857e1a838cbaf1caee3e28f8b55e0be Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Tue, 5 Aug 2014 10:21:46 +0200
Subject: [PATCH 5/5] Add of_match_table section for ams,as3722-rtc driver

---
 drivers/rtc/rtc-as3722.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/rtc/rtc-as3722.c b/drivers/rtc/rtc-as3722.c
index 9f38eda..8dbd3bc 100644
--- a/drivers/rtc/rtc-as3722.c
+++ b/drivers/rtc/rtc-as3722.c
@@ -26,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mfd/as3722.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/rtc.h>
 #include <linux/time.h>
@@ -173,6 +174,14 @@ static const struct rtc_class_ops as3722_rtc_ops = {
 	.alarm_irq_enable = as3722_rtc_alarm_irq_enable,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id as3722_rtc_dt_match[] = {
+	{ .compatible = "ams,as3722-rtc", },
+	{}
+};
+MODULE_DEVICE_TABLE(of, as3722_rtc_dt_match);
+#endif
+
 static int as3722_rtc_probe(struct platform_device *pdev)
 {
 	struct as3722 *as3722 = dev_get_drvdata(pdev->dev.parent);
@@ -249,6 +258,8 @@ static struct platform_driver as3722_rtc_driver = {
 	.probe = as3722_rtc_probe,
 	.driver = {
 		.name = "as3722-rtc",
+		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(as3722_rtc_dt_match),
 		.pm = &as3722_rtc_pm_ops,
 	},
 };
-- 
1.8.3.1