aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2009-11-10 18:22:19 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2009-11-10 18:22:19 +0100
commit9cc704b6854e094a3cf5e977a4e2fd1938d25e40 (patch)
tree7501ca7cb8b5c04479c8b595214ee9da58c5b232 /recipes/linux
parent2a7eb1c2810769fa80dffc1e5080658e645fbb37 (diff)
downloadopenembedded-9cc704b6854e094a3cf5e977a4e2fd1938d25e40.tar.gz
linux-2.6.31: cleanup boc01 RTC driver
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-2.6.31/boc01/005-091110-isl12024.patch (renamed from recipes/linux/linux-2.6.31/boc01/005-091103-isl12024.patch)70
-rw-r--r--recipes/linux/linux_2.6.31.bb2
2 files changed, 35 insertions, 37 deletions
diff --git a/recipes/linux/linux-2.6.31/boc01/005-091103-isl12024.patch b/recipes/linux/linux-2.6.31/boc01/005-091110-isl12024.patch
index 9daab5acaa..0d0f5c42c0 100644
--- a/recipes/linux/linux-2.6.31/boc01/005-091103-isl12024.patch
+++ b/recipes/linux/linux-2.6.31/boc01/005-091110-isl12024.patch
@@ -4,8 +4,8 @@ Signed-off-by: Jeremy Laine <jeremy.laine@m4x.org>
Index: linux-2.6.31/drivers/misc/eeprom/at24.c
===================================================================
---- linux-2.6.31.orig/drivers/misc/eeprom/at24.c 2009-09-10 00:13:59.000000000 +0200
-+++ linux-2.6.31/drivers/misc/eeprom/at24.c 2009-11-03 11:17:22.000000000 +0100
+--- linux-2.6.31.orig/drivers/misc/eeprom/at24.c 2009-11-10 17:20:53.000000000 +0100
++++ linux-2.6.31/drivers/misc/eeprom/at24.c 2009-11-10 17:54:17.000000000 +0100
@@ -115,6 +115,8 @@
{ "spd", AT24_DEVICE_MAGIC(2048 / 8,
AT24_FLAG_READONLY | AT24_FLAG_IRUGO) },
@@ -17,14 +17,14 @@ Index: linux-2.6.31/drivers/misc/eeprom/at24.c
{ "24c16", AT24_DEVICE_MAGIC(16384 / 8, 0) },
Index: linux-2.6.31/drivers/rtc/Kconfig
===================================================================
---- linux-2.6.31.orig/drivers/rtc/Kconfig 2009-09-10 00:13:59.000000000 +0200
-+++ linux-2.6.31/drivers/rtc/Kconfig 2009-11-03 11:13:42.000000000 +0100
+--- linux-2.6.31.orig/drivers/rtc/Kconfig 2009-11-10 17:20:53.000000000 +0100
++++ linux-2.6.31/drivers/rtc/Kconfig 2009-11-10 17:54:17.000000000 +0100
@@ -193,6 +193,15 @@
This driver can also be built as a module. If so, the module
will be called rtc-isl1208.
+config RTC_DRV_ISL12024
-+ tristate "Intersil 12024"
++ tristate "Intersil ISL12024"
+ help
+ If you say yes here you get support for the Intersil ISL12024
+ RTC chip. This driver also exposes the chip's unique ID.
@@ -37,8 +37,8 @@ Index: linux-2.6.31/drivers/rtc/Kconfig
help
Index: linux-2.6.31/drivers/rtc/Makefile
===================================================================
---- linux-2.6.31.orig/drivers/rtc/Makefile 2009-09-10 00:13:59.000000000 +0200
-+++ linux-2.6.31/drivers/rtc/Makefile 2009-11-03 11:13:42.000000000 +0100
+--- linux-2.6.31.orig/drivers/rtc/Makefile 2009-11-10 17:20:53.000000000 +0100
++++ linux-2.6.31/drivers/rtc/Makefile 2009-11-10 17:54:17.000000000 +0100
@@ -40,6 +40,7 @@
obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o
@@ -50,8 +50,8 @@ Index: linux-2.6.31/drivers/rtc/Makefile
Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.31/drivers/rtc/rtc-isl12024.c 2009-11-03 11:14:33.000000000 +0100
-@@ -0,0 +1,457 @@
++++ linux-2.6.31/drivers/rtc/rtc-isl12024.c 2009-11-10 17:54:31.000000000 +0100
+@@ -0,0 +1,455 @@
+/*
+ * Intersil ISL12024 rtc class driver
+ *
@@ -101,7 +101,7 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+#define ISL12024_REG_HR_PM (1<<5) /* AM/PM bit in 12h mode */
+#define ISL12024_RTC_SECTION_LEN 8
+
-+/* control/status section */
++/* status section */
+#define ISL12024_REG_SR 0x3F
+#define ISL12024_REG_SR_BAT (1<<7) /* battery */
+#define ISL12024_REG_SR_AL1 (1<<6) /* alarm 0 */
@@ -110,9 +110,10 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+#define ISL12024_REG_SR_RWEL (1<<2) /* register write enable latch */
+#define ISL12024_REG_SR_WEL (1<<1) /* write enable latch */
+#define ISL12024_REG_SR_RTCF (1<<0) /* rtc fail */
-+#define ISL12024_REG_INT 0x11
+
-+#define ISL12024_INT_AL0E 0x20 /* Alarm 0 enable */
++/* control section */
++#define ISL12024_REG_INT 0x11
++#define ISL12024_INT_AL0E (1<<5) /* Alarm 0 enable */
+
+static struct i2c_driver isl12024_driver;
+
@@ -142,9 +143,9 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ dt_addr[1] = reg;
+
+ ret = i2c_transfer(client->adapter, msgs, 2);
-+ if (ret < 0) {
++ if (ret != 2) {
+ dev_err(&client->dev, "read error (%i)\n", ret);
-+ return ret;
++ return (ret < 0) ? ret : -EIO;
+ }
+ return 0;
+}
@@ -163,7 +164,7 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ ret = i2c_master_send(client, i2c_buf, len + 2);
+ if (ret != len + 2) {
+ dev_err(&client->dev, "write error (%d)\n", ret);
-+ return -EIO;
++ return (ret < 0) ? ret : -EIO;
+ }
+ return 0;
+}
@@ -189,24 +190,25 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ return err;
+ }
+
-+ tm->tm_sec = bcd2bin(regs[0]);
-+ tm->tm_min = bcd2bin(regs[1]);
++ tm->tm_sec = bcd2bin(regs[CCR_SEC]);
++ tm->tm_min = bcd2bin(regs[CCR_MIN]);
+
+ /* HR field has a more complex interpretation */
-+ if (regs[2] & ISL12024_REG_HR_MIL) {
++ if (regs[CCR_HOUR] & ISL12024_REG_HR_MIL) {
+ /* 24h format */
-+ tm->tm_hour = bcd2bin(regs[2] & 0x3f);
++ tm->tm_hour = bcd2bin(regs[CCR_HOUR] & 0x3f);
+ } else {
+ /* 12h format */
-+ tm->tm_hour = bcd2bin(regs[2] & 0x1f);
-+ if (regs[2] & ISL12024_REG_HR_PM) /* PM flag set */
++ tm->tm_hour = bcd2bin(regs[CCR_HOUR] & 0x1f);
++ if (regs[CCR_HOUR] & ISL12024_REG_HR_PM) /* PM flag set */
+ tm->tm_hour += 12;
+ }
+
-+ tm->tm_mday = bcd2bin(regs[3]);
-+ tm->tm_mon = bcd2bin(regs[4]);
-+ tm->tm_year = bcd2bin(regs[5]) + 100;
-+ tm->tm_wday = bcd2bin(regs[6]);
++ tm->tm_mday = bcd2bin(regs[CCR_MDAY]);
++ tm->tm_mon = bcd2bin(regs[CCR_MONTH]) - 1;
++ tm->tm_year = bcd2bin(regs[CCR_YEAR])
++ + (bcd2bin(regs[CCR_Y2K]) * 100) - 1900;
++ tm->tm_wday = bcd2bin(regs[CCR_WDAY]);
+
+ return rtc_valid_tm(tm);
+}
@@ -247,12 +249,12 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ buf[CCR_MDAY] = bin2bcd(tm->tm_mday);
+
+ /* month, 1 - 12 */
-+ buf[CCR_MONTH] = bin2bcd(tm->tm_mon);
++ buf[CCR_MONTH] = bin2bcd(tm->tm_mon + 1);
+
+ /* year, since the rtc epoch*/
+ buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100);
+ buf[CCR_WDAY] = tm->tm_wday & 0x07;
-+ buf[CCR_Y2K] = bin2bcd(tm->tm_year / 100);
++ buf[CCR_Y2K] = bin2bcd(19 + tm->tm_year / 100);
+ }
+
+ /* If writing alarm registers, set compare bits on registers 0-4 */
@@ -293,10 +295,8 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ /* Need to set RWEL again as the write has cleared it */
+ xfer = i2c_master_send(client, rwel, 3);
+ if (xfer != 3) {
-+ dev_err(&client->dev,
-+ "%s: al0e rwel - %d\n",
-+ __func__,
-+ xfer);
++ dev_err(&client->dev, "%s: al0e rwel - %d\n",
++ __func__, xfer);
+ return -EIO;
+ }
+
@@ -305,10 +305,8 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+
+ xfer = i2c_master_send(client, al0e, 3);
+ if (xfer != 3) {
-+ dev_err(&client->dev,
-+ "%s: al0e - %d\n",
-+ __func__,
-+ xfer);
++ dev_err(&client->dev, "%s: al0e - %d\n",
++ __func__, xfer);
+ return -EIO;
+ }
+
@@ -403,7 +401,7 @@ Index: linux-2.6.31/drivers/rtc/rtc-isl12024.c
+ err = isl12024_i2c_read_regs(client, ISL12024_REG_ID, id_buffer,
+ sizeof(id_buffer));
+ if (err < 0) {
-+ dev_err(&client->dev, "reading RTC section failed\n");
++ dev_err(&client->dev, "reading ID section failed\n");
+ return err;
+ }
+
diff --git a/recipes/linux/linux_2.6.31.bb b/recipes/linux/linux_2.6.31.bb
index 21ebe2cc95..845909c76c 100644
--- a/recipes/linux/linux_2.6.31.bb
+++ b/recipes/linux/linux_2.6.31.bb
@@ -26,7 +26,7 @@ SRC_URI_append_boc01 = "\
file://boc01.dts \
file://boc01.dts.v1 \
file://004-081205-usb.patch;patch=1 \
- file://005-091103-isl12024.patch;patch=1 \
+ file://005-091110-isl12024.patch;patch=1 \
file://007-091005-lm73.patch;patch=1 \
file://011-091028-gpio.patch;patch=1 \
file://012-091019-capsense.patch;patch=1 \
'paule/buildhistory-src-uri'>paule/buildhistory-src-uri OpenEmbedded Core user contribution treesGrokmirror user
aboutsummaryrefslogtreecommitdiffstats
path: root/meta/conf/documentation.conf
blob: 3a918e8bbfd86ae81dfda77a42d4fef4cf9d7172 (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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458