aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-ds1307.c48
1 files changed, 19 insertions, 29 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 58edcb076742..5098e1ad3a3e 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -36,6 +36,7 @@ enum ds_type {
36 m41t00, 36 m41t00,
37 mcp7941x, 37 mcp7941x,
38 rx_8025, 38 rx_8025,
39 last_ds_type /* always last */
39 // rs5c372 too? different address... 40 // rs5c372 too? different address...
40}; 41};
41 42
@@ -120,30 +121,23 @@ struct chip_desc {
120 unsigned alarm:1; 121 unsigned alarm:1;
121}; 122};
122 123
123static const struct chip_desc chips[] = { 124static const struct chip_desc chips[last_ds_type] = {
124[ds_1307] = { 125 [ds_1307] = {
125 .nvram56 = 1, 126 .nvram56 = 1,
126}, 127 },
127[ds_1337] = { 128 [ds_1337] = {
128 .alarm = 1, 129 .alarm = 1,
129}, 130 },
130[ds_1338] = { 131 [ds_1338] = {
131 .nvram56 = 1, 132 .nvram56 = 1,
132}, 133 },
133[ds_1339] = { 134 [ds_1339] = {
134 .alarm = 1, 135 .alarm = 1,
135}, 136 },
136[ds_1340] = { 137 [ds_3231] = {
137}, 138 .alarm = 1,
138[ds_3231] = { 139 },
139 .alarm = 1, 140};
140},
141[m41t00] = {
142},
143[mcp7941x] = {
144},
145[rx_8025] = {
146}, };
147 141
148static const struct i2c_device_id ds1307_id[] = { 142static const struct i2c_device_id ds1307_id[] = {
149 { "ds1307", ds_1307 }, 143 { "ds1307", ds_1307 },
@@ -836,11 +830,7 @@ read_rtc:
836 } 830 }
837 831
838 break; 832 break;
839 case rx_8025: 833 default:
840 case ds_1337:
841 case ds_1339:
842 case ds_1388:
843 case ds_3231:
844 break; 834 break;
845 } 835 }
846 836