Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: ds1307: add ds1308 variant

The ds1308 variant is very similar to the already supported ds1338
variant, it have more debug registers and a square wave clock output.

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

authored by

Sean Nyekjaer and committed by
Alexandre Belloni
300a7735 c35c4195

+12
+12
drivers/rtc/rtc-ds1307.c
··· 34 34 */ 35 35 enum ds_type { 36 36 ds_1307, 37 + ds_1308, 37 38 ds_1337, 38 39 ds_1338, 39 40 ds_1339, ··· 153 152 .nvram_offset = 8, 154 153 .nvram_size = 56, 155 154 }, 155 + [ds_1308] = { 156 + .nvram_offset = 8, 157 + .nvram_size = 56, 158 + }, 156 159 [ds_1337] = { 157 160 .alarm = 1, 158 161 .century_reg = DS1307_REG_MONTH, ··· 203 198 204 199 static const struct i2c_device_id ds1307_id[] = { 205 200 { "ds1307", ds_1307 }, 201 + { "ds1308", ds_1308 }, 206 202 { "ds1337", ds_1337 }, 207 203 { "ds1338", ds_1338 }, 208 204 { "ds1339", ds_1339 }, ··· 227 221 { 228 222 .compatible = "dallas,ds1307", 229 223 .data = (void *)ds_1307 224 + }, 225 + { 226 + .compatible = "dallas,ds1308", 227 + .data = (void *)ds_1308 230 228 }, 231 229 { 232 230 .compatible = "dallas,ds1337", ··· 292 282 #ifdef CONFIG_ACPI 293 283 static const struct acpi_device_id ds1307_acpi_ids[] = { 294 284 { .id = "DS1307", .driver_data = ds_1307 }, 285 + { .id = "DS1308", .driver_data = ds_1308 }, 295 286 { .id = "DS1337", .driver_data = ds_1337 }, 296 287 { .id = "DS1338", .driver_data = ds_1338 }, 297 288 { .id = "DS1339", .driver_data = ds_1339 }, ··· 1569 1558 goto read_rtc; 1570 1559 } 1571 1560 break; 1561 + case ds_1308: 1572 1562 case ds_1338: 1573 1563 /* clock halted? turn it on, so clock can tick. */ 1574 1564 if (tmp & DS1307_BIT_CH)