diff options
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 20 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1511.c | 17 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1553.c | 17 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds3232.c | 18 | ||||
-rw-r--r-- | drivers/rtc/rtc-jz4740.c | 7 | ||||
-rw-r--r-- | drivers/rtc/rtc-mc13xxx.c | 7 | ||||
-rw-r--r-- | drivers/rtc/rtc-mpc5121.c | 20 | ||||
-rw-r--r-- | drivers/rtc/rtc-mxc.c | 7 | ||||
-rw-r--r-- | drivers/rtc/rtc-nuc900.c | 15 | ||||
-rw-r--r-- | drivers/rtc/rtc-pcap.c | 6 | ||||
-rw-r--r-- | drivers/rtc/rtc-pcf50633.c | 22 | ||||
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 16 | ||||
-rw-r--r-- | drivers/rtc/rtc-stmp3xxx.c | 15 | ||||
-rw-r--r-- | drivers/rtc/rtc-twl.c | 13 | ||||
-rw-r--r-- | drivers/rtc/rtc-wm831x.c | 16 | ||||
-rw-r--r-- | drivers/rtc/rtc-wm8350.c | 21 | ||||
-rw-r--r-- | include/linux/rtc.h | 1 |
17 files changed, 1 insertions, 237 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index bdb1f8e2042a..dc2a0ba969ce 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -394,25 +394,6 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | 396 | ||
397 | static int cmos_update_irq_enable(struct device *dev, unsigned int enabled) | ||
398 | { | ||
399 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
400 | unsigned long flags; | ||
401 | |||
402 | if (!is_valid_irq(cmos->irq)) | ||
403 | return -EINVAL; | ||
404 | |||
405 | spin_lock_irqsave(&rtc_lock, flags); | ||
406 | |||
407 | if (enabled) | ||
408 | cmos_irq_enable(cmos, RTC_UIE); | ||
409 | else | ||
410 | cmos_irq_disable(cmos, RTC_UIE); | ||
411 | |||
412 | spin_unlock_irqrestore(&rtc_lock, flags); | ||
413 | return 0; | ||
414 | } | ||
415 | |||
416 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 397 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) |
417 | 398 | ||
418 | static int cmos_procfs(struct device *dev, struct seq_file *seq) | 399 | static int cmos_procfs(struct device *dev, struct seq_file *seq) |
@@ -458,7 +439,6 @@ static const struct rtc_class_ops cmos_rtc_ops = { | |||
458 | .set_alarm = cmos_set_alarm, | 439 | .set_alarm = cmos_set_alarm, |
459 | .proc = cmos_procfs, | 440 | .proc = cmos_procfs, |
460 | .alarm_irq_enable = cmos_alarm_irq_enable, | 441 | .alarm_irq_enable = cmos_alarm_irq_enable, |
461 | .update_irq_enable = cmos_update_irq_enable, | ||
462 | }; | 442 | }; |
463 | 443 | ||
464 | /*----------------------------------------------------------------*/ | 444 | /*----------------------------------------------------------------*/ |
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 37268e97de49..3fffd708711f 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c | |||
@@ -397,29 +397,12 @@ static int ds1511_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
397 | return 0; | 397 | return 0; |
398 | } | 398 | } |
399 | 399 | ||
400 | static int ds1511_rtc_update_irq_enable(struct device *dev, | ||
401 | unsigned int enabled) | ||
402 | { | ||
403 | struct platform_device *pdev = to_platform_device(dev); | ||
404 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | ||
405 | |||
406 | if (pdata->irq <= 0) | ||
407 | return -EINVAL; | ||
408 | if (enabled) | ||
409 | pdata->irqen |= RTC_UF; | ||
410 | else | ||
411 | pdata->irqen &= ~RTC_UF; | ||
412 | ds1511_rtc_update_alarm(pdata); | ||
413 | return 0; | ||
414 | } | ||
415 | |||
416 | static const struct rtc_class_ops ds1511_rtc_ops = { | 400 | static const struct rtc_class_ops ds1511_rtc_ops = { |
417 | .read_time = ds1511_rtc_read_time, | 401 | .read_time = ds1511_rtc_read_time, |
418 | .set_time = ds1511_rtc_set_time, | 402 | .set_time = ds1511_rtc_set_time, |
419 | .read_alarm = ds1511_rtc_read_alarm, | 403 | .read_alarm = ds1511_rtc_read_alarm, |
420 | .set_alarm = ds1511_rtc_set_alarm, | 404 | .set_alarm = ds1511_rtc_set_alarm, |
421 | .alarm_irq_enable = ds1511_rtc_alarm_irq_enable, | 405 | .alarm_irq_enable = ds1511_rtc_alarm_irq_enable, |
422 | .update_irq_enable = ds1511_rtc_update_irq_enable, | ||
423 | }; | 406 | }; |
424 | 407 | ||
425 | static ssize_t | 408 | static ssize_t |
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index ff432e2ca275..fee41b97c9e8 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c | |||
@@ -227,29 +227,12 @@ static int ds1553_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | 229 | ||
230 | static int ds1553_rtc_update_irq_enable(struct device *dev, | ||
231 | unsigned int enabled) | ||
232 | { | ||
233 | struct platform_device *pdev = to_platform_device(dev); | ||
234 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | ||
235 | |||
236 | if (pdata->irq <= 0) | ||
237 | return -EINVAL; | ||
238 | if (enabled) | ||
239 | pdata->irqen |= RTC_UF; | ||
240 | else | ||
241 | pdata->irqen &= ~RTC_UF; | ||
242 | ds1553_rtc_update_alarm(pdata); | ||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | static const struct rtc_class_ops ds1553_rtc_ops = { | 230 | static const struct rtc_class_ops ds1553_rtc_ops = { |
247 | .read_time = ds1553_rtc_read_time, | 231 | .read_time = ds1553_rtc_read_time, |
248 | .set_time = ds1553_rtc_set_time, | 232 | .set_time = ds1553_rtc_set_time, |
249 | .read_alarm = ds1553_rtc_read_alarm, | 233 | .read_alarm = ds1553_rtc_read_alarm, |
250 | .set_alarm = ds1553_rtc_set_alarm, | 234 | .set_alarm = ds1553_rtc_set_alarm, |
251 | .alarm_irq_enable = ds1553_rtc_alarm_irq_enable, | 235 | .alarm_irq_enable = ds1553_rtc_alarm_irq_enable, |
252 | .update_irq_enable = ds1553_rtc_update_irq_enable, | ||
253 | }; | 236 | }; |
254 | 237 | ||
255 | static ssize_t ds1553_nvram_read(struct file *filp, struct kobject *kobj, | 238 | static ssize_t ds1553_nvram_read(struct file *filp, struct kobject *kobj, |
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 950735415a7c..27b7bf672ac6 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c | |||
@@ -339,23 +339,6 @@ static int ds3232_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
339 | return 0; | 339 | return 0; |
340 | } | 340 | } |
341 | 341 | ||
342 | static int ds3232_update_irq_enable(struct device *dev, unsigned int enabled) | ||
343 | { | ||
344 | struct i2c_client *client = to_i2c_client(dev); | ||
345 | struct ds3232 *ds3232 = i2c_get_clientdata(client); | ||
346 | |||
347 | if (client->irq <= 0) | ||
348 | return -EINVAL; | ||
349 | |||
350 | if (enabled) | ||
351 | ds3232->rtc->irq_data |= RTC_UF; | ||
352 | else | ||
353 | ds3232->rtc->irq_data &= ~RTC_UF; | ||
354 | |||
355 | ds3232_update_alarm(client); | ||
356 | return 0; | ||
357 | } | ||
358 | |||
359 | static irqreturn_t ds3232_irq(int irq, void *dev_id) | 342 | static irqreturn_t ds3232_irq(int irq, void *dev_id) |
360 | { | 343 | { |
361 | struct i2c_client *client = dev_id; | 344 | struct i2c_client *client = dev_id; |
@@ -406,7 +389,6 @@ static const struct rtc_class_ops ds3232_rtc_ops = { | |||
406 | .read_alarm = ds3232_read_alarm, | 389 | .read_alarm = ds3232_read_alarm, |
407 | .set_alarm = ds3232_set_alarm, | 390 | .set_alarm = ds3232_set_alarm, |
408 | .alarm_irq_enable = ds3232_alarm_irq_enable, | 391 | .alarm_irq_enable = ds3232_alarm_irq_enable, |
409 | .update_irq_enable = ds3232_update_irq_enable, | ||
410 | }; | 392 | }; |
411 | 393 | ||
412 | static int __devinit ds3232_probe(struct i2c_client *client, | 394 | static int __devinit ds3232_probe(struct i2c_client *client, |
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 2e16f72c9056..b6473631d182 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c | |||
@@ -168,12 +168,6 @@ static int jz4740_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
168 | return ret; | 168 | return ret; |
169 | } | 169 | } |
170 | 170 | ||
171 | static int jz4740_rtc_update_irq_enable(struct device *dev, unsigned int enable) | ||
172 | { | ||
173 | struct jz4740_rtc *rtc = dev_get_drvdata(dev); | ||
174 | return jz4740_rtc_ctrl_set_bits(rtc, JZ_RTC_CTRL_1HZ_IRQ, enable); | ||
175 | } | ||
176 | |||
177 | static int jz4740_rtc_alarm_irq_enable(struct device *dev, unsigned int enable) | 171 | static int jz4740_rtc_alarm_irq_enable(struct device *dev, unsigned int enable) |
178 | { | 172 | { |
179 | struct jz4740_rtc *rtc = dev_get_drvdata(dev); | 173 | struct jz4740_rtc *rtc = dev_get_drvdata(dev); |
@@ -185,7 +179,6 @@ static struct rtc_class_ops jz4740_rtc_ops = { | |||
185 | .set_mmss = jz4740_rtc_set_mmss, | 179 | .set_mmss = jz4740_rtc_set_mmss, |
186 | .read_alarm = jz4740_rtc_read_alarm, | 180 | .read_alarm = jz4740_rtc_read_alarm, |
187 | .set_alarm = jz4740_rtc_set_alarm, | 181 | .set_alarm = jz4740_rtc_set_alarm, |
188 | .update_irq_enable = jz4740_rtc_update_irq_enable, | ||
189 | .alarm_irq_enable = jz4740_rtc_alarm_irq_enable, | 182 | .alarm_irq_enable = jz4740_rtc_alarm_irq_enable, |
190 | }; | 183 | }; |
191 | 184 | ||
diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index 5314b153bfba..c42006469559 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c | |||
@@ -282,12 +282,6 @@ static irqreturn_t mc13xxx_rtc_update_handler(int irq, void *dev) | |||
282 | return IRQ_HANDLED; | 282 | return IRQ_HANDLED; |
283 | } | 283 | } |
284 | 284 | ||
285 | static int mc13xxx_rtc_update_irq_enable(struct device *dev, | ||
286 | unsigned int enabled) | ||
287 | { | ||
288 | return mc13xxx_rtc_irq_enable(dev, enabled, MC13XXX_IRQ_1HZ); | ||
289 | } | ||
290 | |||
291 | static int mc13xxx_rtc_alarm_irq_enable(struct device *dev, | 285 | static int mc13xxx_rtc_alarm_irq_enable(struct device *dev, |
292 | unsigned int enabled) | 286 | unsigned int enabled) |
293 | { | 287 | { |
@@ -300,7 +294,6 @@ static const struct rtc_class_ops mc13xxx_rtc_ops = { | |||
300 | .read_alarm = mc13xxx_rtc_read_alarm, | 294 | .read_alarm = mc13xxx_rtc_read_alarm, |
301 | .set_alarm = mc13xxx_rtc_set_alarm, | 295 | .set_alarm = mc13xxx_rtc_set_alarm, |
302 | .alarm_irq_enable = mc13xxx_rtc_alarm_irq_enable, | 296 | .alarm_irq_enable = mc13xxx_rtc_alarm_irq_enable, |
303 | .update_irq_enable = mc13xxx_rtc_update_irq_enable, | ||
304 | }; | 297 | }; |
305 | 298 | ||
306 | static irqreturn_t mc13xxx_rtc_reset_handler(int irq, void *dev) | 299 | static irqreturn_t mc13xxx_rtc_reset_handler(int irq, void *dev) |
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index dfcdf0901d21..b40c1ff1ebc8 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
@@ -240,32 +240,12 @@ static int mpc5121_rtc_alarm_irq_enable(struct device *dev, | |||
240 | return 0; | 240 | return 0; |
241 | } | 241 | } |
242 | 242 | ||
243 | static int mpc5121_rtc_update_irq_enable(struct device *dev, | ||
244 | unsigned int enabled) | ||
245 | { | ||
246 | struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); | ||
247 | struct mpc5121_rtc_regs __iomem *regs = rtc->regs; | ||
248 | int val; | ||
249 | |||
250 | val = in_8(®s->int_enable); | ||
251 | |||
252 | if (enabled) | ||
253 | val = (val & ~0x8) | 0x1; | ||
254 | else | ||
255 | val &= ~0x1; | ||
256 | |||
257 | out_8(®s->int_enable, val); | ||
258 | |||
259 | return 0; | ||
260 | } | ||
261 | |||
262 | static const struct rtc_class_ops mpc5121_rtc_ops = { | 243 | static const struct rtc_class_ops mpc5121_rtc_ops = { |
263 | .read_time = mpc5121_rtc_read_time, | 244 | .read_time = mpc5121_rtc_read_time, |
264 | .set_time = mpc5121_rtc_set_time, | 245 | .set_time = mpc5121_rtc_set_time, |
265 | .read_alarm = mpc5121_rtc_read_alarm, | 246 | .read_alarm = mpc5121_rtc_read_alarm, |
266 | .set_alarm = mpc5121_rtc_set_alarm, | 247 | .set_alarm = mpc5121_rtc_set_alarm, |
267 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, | 248 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, |
268 | .update_irq_enable = mpc5121_rtc_update_irq_enable, | ||
269 | }; | 249 | }; |
270 | 250 | ||
271 | static int __devinit mpc5121_rtc_probe(struct platform_device *op, | 251 | static int __devinit mpc5121_rtc_probe(struct platform_device *op, |
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 0b06c1e03fd5..826ab64a8fa9 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
@@ -274,12 +274,6 @@ static int mxc_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | 276 | ||
277 | static int mxc_rtc_update_irq_enable(struct device *dev, unsigned int enabled) | ||
278 | { | ||
279 | mxc_rtc_irq_enable(dev, RTC_1HZ_BIT, enabled); | ||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | /* | 277 | /* |
284 | * This function reads the current RTC time into tm in Gregorian date. | 278 | * This function reads the current RTC time into tm in Gregorian date. |
285 | */ | 279 | */ |
@@ -368,7 +362,6 @@ static struct rtc_class_ops mxc_rtc_ops = { | |||
368 | .read_alarm = mxc_rtc_read_alarm, | 362 | .read_alarm = mxc_rtc_read_alarm, |
369 | .set_alarm = mxc_rtc_set_alarm, | 363 | .set_alarm = mxc_rtc_set_alarm, |
370 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, | 364 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, |
371 | .update_irq_enable = mxc_rtc_update_irq_enable, | ||
372 | }; | 365 | }; |
373 | 366 | ||
374 | static int __init mxc_rtc_probe(struct platform_device *pdev) | 367 | static int __init mxc_rtc_probe(struct platform_device *pdev) |
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c index ddb0857e15a4..781068d62f23 100644 --- a/drivers/rtc/rtc-nuc900.c +++ b/drivers/rtc/rtc-nuc900.c | |||
@@ -134,20 +134,6 @@ static void nuc900_rtc_bin2bcd(struct device *dev, struct rtc_time *settm, | |||
134 | gettm->bcd_hour = bin2bcd(settm->tm_hour) << 16; | 134 | gettm->bcd_hour = bin2bcd(settm->tm_hour) << 16; |
135 | } | 135 | } |
136 | 136 | ||
137 | static int nuc900_update_irq_enable(struct device *dev, unsigned int enabled) | ||
138 | { | ||
139 | struct nuc900_rtc *rtc = dev_get_drvdata(dev); | ||
140 | |||
141 | if (enabled) | ||
142 | __raw_writel(__raw_readl(rtc->rtc_reg + REG_RTC_RIER)| | ||
143 | (TICKINTENB), rtc->rtc_reg + REG_RTC_RIER); | ||
144 | else | ||
145 | __raw_writel(__raw_readl(rtc->rtc_reg + REG_RTC_RIER)& | ||
146 | (~TICKINTENB), rtc->rtc_reg + REG_RTC_RIER); | ||
147 | |||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | static int nuc900_alarm_irq_enable(struct device *dev, unsigned int enabled) | 137 | static int nuc900_alarm_irq_enable(struct device *dev, unsigned int enabled) |
152 | { | 138 | { |
153 | struct nuc900_rtc *rtc = dev_get_drvdata(dev); | 139 | struct nuc900_rtc *rtc = dev_get_drvdata(dev); |
@@ -234,7 +220,6 @@ static struct rtc_class_ops nuc900_rtc_ops = { | |||
234 | .read_alarm = nuc900_rtc_read_alarm, | 220 | .read_alarm = nuc900_rtc_read_alarm, |
235 | .set_alarm = nuc900_rtc_set_alarm, | 221 | .set_alarm = nuc900_rtc_set_alarm, |
236 | .alarm_irq_enable = nuc900_alarm_irq_enable, | 222 | .alarm_irq_enable = nuc900_alarm_irq_enable, |
237 | .update_irq_enable = nuc900_update_irq_enable, | ||
238 | }; | 223 | }; |
239 | 224 | ||
240 | static int __devinit nuc900_rtc_probe(struct platform_device *pdev) | 225 | static int __devinit nuc900_rtc_probe(struct platform_device *pdev) |
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index 25c0b3fd44f1..a633abc42896 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c | |||
@@ -131,18 +131,12 @@ static int pcap_rtc_alarm_irq_enable(struct device *dev, unsigned int en) | |||
131 | return pcap_rtc_irq_enable(dev, PCAP_IRQ_TODA, en); | 131 | return pcap_rtc_irq_enable(dev, PCAP_IRQ_TODA, en); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int pcap_rtc_update_irq_enable(struct device *dev, unsigned int en) | ||
135 | { | ||
136 | return pcap_rtc_irq_enable(dev, PCAP_IRQ_1HZ, en); | ||
137 | } | ||
138 | |||
139 | static const struct rtc_class_ops pcap_rtc_ops = { | 134 | static const struct rtc_class_ops pcap_rtc_ops = { |
140 | .read_time = pcap_rtc_read_time, | 135 | .read_time = pcap_rtc_read_time, |
141 | .read_alarm = pcap_rtc_read_alarm, | 136 | .read_alarm = pcap_rtc_read_alarm, |
142 | .set_alarm = pcap_rtc_set_alarm, | 137 | .set_alarm = pcap_rtc_set_alarm, |
143 | .set_mmss = pcap_rtc_set_mmss, | 138 | .set_mmss = pcap_rtc_set_mmss, |
144 | .alarm_irq_enable = pcap_rtc_alarm_irq_enable, | 139 | .alarm_irq_enable = pcap_rtc_alarm_irq_enable, |
145 | .update_irq_enable = pcap_rtc_update_irq_enable, | ||
146 | }; | 140 | }; |
147 | 141 | ||
148 | static int __devinit pcap_rtc_probe(struct platform_device *pdev) | 142 | static int __devinit pcap_rtc_probe(struct platform_device *pdev) |
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 16edf94ab42f..f90c574f9d05 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c | |||
@@ -106,25 +106,6 @@ pcf50633_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | static int | ||
110 | pcf50633_rtc_update_irq_enable(struct device *dev, unsigned int enabled) | ||
111 | { | ||
112 | struct pcf50633_rtc *rtc = dev_get_drvdata(dev); | ||
113 | int err; | ||
114 | |||
115 | if (enabled) | ||
116 | err = pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_SECOND); | ||
117 | else | ||
118 | err = pcf50633_irq_mask(rtc->pcf, PCF50633_IRQ_SECOND); | ||
119 | |||
120 | if (err < 0) | ||
121 | return err; | ||
122 | |||
123 | rtc->second_enabled = enabled; | ||
124 | |||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm) | 109 | static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm) |
129 | { | 110 | { |
130 | struct pcf50633_rtc *rtc; | 111 | struct pcf50633_rtc *rtc; |
@@ -262,8 +243,7 @@ static struct rtc_class_ops pcf50633_rtc_ops = { | |||
262 | .set_time = pcf50633_rtc_set_time, | 243 | .set_time = pcf50633_rtc_set_time, |
263 | .read_alarm = pcf50633_rtc_read_alarm, | 244 | .read_alarm = pcf50633_rtc_read_alarm, |
264 | .set_alarm = pcf50633_rtc_set_alarm, | 245 | .set_alarm = pcf50633_rtc_set_alarm, |
265 | .alarm_irq_enable = pcf50633_rtc_alarm_irq_enable, | 246 | .alarm_irq_enable = pcf50633_rtc_alarm_irq_enable, |
266 | .update_irq_enable = pcf50633_rtc_update_irq_enable, | ||
267 | }; | 247 | }; |
268 | 248 | ||
269 | static void pcf50633_rtc_irq(int irq, void *data) | 249 | static void pcf50633_rtc_irq(int irq, void *data) |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index a1fdc802598a..fc9f4991574b 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -224,21 +224,6 @@ static int pxa_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | 226 | ||
227 | static int pxa_update_irq_enable(struct device *dev, unsigned int enabled) | ||
228 | { | ||
229 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | ||
230 | |||
231 | spin_lock_irq(&pxa_rtc->lock); | ||
232 | |||
233 | if (enabled) | ||
234 | rtsr_set_bits(pxa_rtc, RTSR_HZE); | ||
235 | else | ||
236 | rtsr_clear_bits(pxa_rtc, RTSR_HZE); | ||
237 | |||
238 | spin_unlock_irq(&pxa_rtc->lock); | ||
239 | return 0; | ||
240 | } | ||
241 | |||
242 | static int pxa_rtc_read_time(struct device *dev, struct rtc_time *tm) | 227 | static int pxa_rtc_read_time(struct device *dev, struct rtc_time *tm) |
243 | { | 228 | { |
244 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | 229 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); |
@@ -320,7 +305,6 @@ static const struct rtc_class_ops pxa_rtc_ops = { | |||
320 | .read_alarm = pxa_rtc_read_alarm, | 305 | .read_alarm = pxa_rtc_read_alarm, |
321 | .set_alarm = pxa_rtc_set_alarm, | 306 | .set_alarm = pxa_rtc_set_alarm, |
322 | .alarm_irq_enable = pxa_alarm_irq_enable, | 307 | .alarm_irq_enable = pxa_alarm_irq_enable, |
323 | .update_irq_enable = pxa_update_irq_enable, | ||
324 | .proc = pxa_rtc_proc, | 308 | .proc = pxa_rtc_proc, |
325 | }; | 309 | }; |
326 | 310 | ||
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c index 7e7d0c806f2d..572e9534b591 100644 --- a/drivers/rtc/rtc-stmp3xxx.c +++ b/drivers/rtc/rtc-stmp3xxx.c | |||
@@ -115,19 +115,6 @@ static int stmp3xxx_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | static int stmp3xxx_update_irq_enable(struct device *dev, unsigned int enabled) | ||
119 | { | ||
120 | struct stmp3xxx_rtc_data *rtc_data = dev_get_drvdata(dev); | ||
121 | |||
122 | if (enabled) | ||
123 | stmp3xxx_setl(BM_RTC_CTRL_ONEMSEC_IRQ_EN, | ||
124 | rtc_data->io + HW_RTC_CTRL); | ||
125 | else | ||
126 | stmp3xxx_clearl(BM_RTC_CTRL_ONEMSEC_IRQ_EN, | ||
127 | rtc_data->io + HW_RTC_CTRL); | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static int stmp3xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) | 118 | static int stmp3xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) |
132 | { | 119 | { |
133 | struct stmp3xxx_rtc_data *rtc_data = dev_get_drvdata(dev); | 120 | struct stmp3xxx_rtc_data *rtc_data = dev_get_drvdata(dev); |
@@ -149,8 +136,6 @@ static int stmp3xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) | |||
149 | static struct rtc_class_ops stmp3xxx_rtc_ops = { | 136 | static struct rtc_class_ops stmp3xxx_rtc_ops = { |
150 | .alarm_irq_enable = | 137 | .alarm_irq_enable = |
151 | stmp3xxx_alarm_irq_enable, | 138 | stmp3xxx_alarm_irq_enable, |
152 | .update_irq_enable = | ||
153 | stmp3xxx_update_irq_enable, | ||
154 | .read_time = stmp3xxx_rtc_gettime, | 139 | .read_time = stmp3xxx_rtc_gettime, |
155 | .set_mmss = stmp3xxx_rtc_set_mmss, | 140 | .set_mmss = stmp3xxx_rtc_set_mmss, |
156 | .read_alarm = stmp3xxx_rtc_read_alarm, | 141 | .read_alarm = stmp3xxx_rtc_read_alarm, |
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index ed1b86828124..f9a2799c44d6 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c | |||
@@ -213,18 +213,6 @@ static int twl_rtc_alarm_irq_enable(struct device *dev, unsigned enabled) | |||
213 | return ret; | 213 | return ret; |
214 | } | 214 | } |
215 | 215 | ||
216 | static int twl_rtc_update_irq_enable(struct device *dev, unsigned enabled) | ||
217 | { | ||
218 | int ret; | ||
219 | |||
220 | if (enabled) | ||
221 | ret = set_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); | ||
222 | else | ||
223 | ret = mask_rtc_irq_bit(BIT_RTC_INTERRUPTS_REG_IT_TIMER_M); | ||
224 | |||
225 | return ret; | ||
226 | } | ||
227 | |||
228 | /* | 216 | /* |
229 | * Gets current TWL RTC time and date parameters. | 217 | * Gets current TWL RTC time and date parameters. |
230 | * | 218 | * |
@@ -433,7 +421,6 @@ static struct rtc_class_ops twl_rtc_ops = { | |||
433 | .read_alarm = twl_rtc_read_alarm, | 421 | .read_alarm = twl_rtc_read_alarm, |
434 | .set_alarm = twl_rtc_set_alarm, | 422 | .set_alarm = twl_rtc_set_alarm, |
435 | .alarm_irq_enable = twl_rtc_alarm_irq_enable, | 423 | .alarm_irq_enable = twl_rtc_alarm_irq_enable, |
436 | .update_irq_enable = twl_rtc_update_irq_enable, | ||
437 | }; | 424 | }; |
438 | 425 | ||
439 | /*----------------------------------------------------------------------*/ | 426 | /*----------------------------------------------------------------------*/ |
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 82931dc65c0b..bdc909bd56da 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c | |||
@@ -315,21 +315,6 @@ static int wm831x_rtc_alarm_irq_enable(struct device *dev, | |||
315 | return wm831x_rtc_stop_alarm(wm831x_rtc); | 315 | return wm831x_rtc_stop_alarm(wm831x_rtc); |
316 | } | 316 | } |
317 | 317 | ||
318 | static int wm831x_rtc_update_irq_enable(struct device *dev, | ||
319 | unsigned int enabled) | ||
320 | { | ||
321 | struct wm831x_rtc *wm831x_rtc = dev_get_drvdata(dev); | ||
322 | int val; | ||
323 | |||
324 | if (enabled) | ||
325 | val = 1 << WM831X_RTC_PINT_FREQ_SHIFT; | ||
326 | else | ||
327 | val = 0; | ||
328 | |||
329 | return wm831x_set_bits(wm831x_rtc->wm831x, WM831X_RTC_CONTROL, | ||
330 | WM831X_RTC_PINT_FREQ_MASK, val); | ||
331 | } | ||
332 | |||
333 | static irqreturn_t wm831x_alm_irq(int irq, void *data) | 318 | static irqreturn_t wm831x_alm_irq(int irq, void *data) |
334 | { | 319 | { |
335 | struct wm831x_rtc *wm831x_rtc = data; | 320 | struct wm831x_rtc *wm831x_rtc = data; |
@@ -354,7 +339,6 @@ static const struct rtc_class_ops wm831x_rtc_ops = { | |||
354 | .read_alarm = wm831x_rtc_readalarm, | 339 | .read_alarm = wm831x_rtc_readalarm, |
355 | .set_alarm = wm831x_rtc_setalarm, | 340 | .set_alarm = wm831x_rtc_setalarm, |
356 | .alarm_irq_enable = wm831x_rtc_alarm_irq_enable, | 341 | .alarm_irq_enable = wm831x_rtc_alarm_irq_enable, |
357 | .update_irq_enable = wm831x_rtc_update_irq_enable, | ||
358 | }; | 342 | }; |
359 | 343 | ||
360 | #ifdef CONFIG_PM | 344 | #ifdef CONFIG_PM |
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c index 3d0dc76b38af..66421426e404 100644 --- a/drivers/rtc/rtc-wm8350.c +++ b/drivers/rtc/rtc-wm8350.c | |||
@@ -302,26 +302,6 @@ static int wm8350_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
302 | return ret; | 302 | return ret; |
303 | } | 303 | } |
304 | 304 | ||
305 | static int wm8350_rtc_update_irq_enable(struct device *dev, | ||
306 | unsigned int enabled) | ||
307 | { | ||
308 | struct wm8350 *wm8350 = dev_get_drvdata(dev); | ||
309 | |||
310 | /* Suppress duplicate changes since genirq nests enable and | ||
311 | * disable calls. */ | ||
312 | if (enabled == wm8350->rtc.update_enabled) | ||
313 | return 0; | ||
314 | |||
315 | if (enabled) | ||
316 | wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_SEC); | ||
317 | else | ||
318 | wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC); | ||
319 | |||
320 | wm8350->rtc.update_enabled = enabled; | ||
321 | |||
322 | return 0; | ||
323 | } | ||
324 | |||
325 | static irqreturn_t wm8350_rtc_alarm_handler(int irq, void *data) | 305 | static irqreturn_t wm8350_rtc_alarm_handler(int irq, void *data) |
326 | { | 306 | { |
327 | struct wm8350 *wm8350 = data; | 307 | struct wm8350 *wm8350 = data; |
@@ -357,7 +337,6 @@ static const struct rtc_class_ops wm8350_rtc_ops = { | |||
357 | .read_alarm = wm8350_rtc_readalarm, | 337 | .read_alarm = wm8350_rtc_readalarm, |
358 | .set_alarm = wm8350_rtc_setalarm, | 338 | .set_alarm = wm8350_rtc_setalarm, |
359 | .alarm_irq_enable = wm8350_rtc_alarm_irq_enable, | 339 | .alarm_irq_enable = wm8350_rtc_alarm_irq_enable, |
360 | .update_irq_enable = wm8350_rtc_update_irq_enable, | ||
361 | }; | 340 | }; |
362 | 341 | ||
363 | #ifdef CONFIG_PM | 342 | #ifdef CONFIG_PM |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 741a51cc4460..2ca7e8a78060 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -149,7 +149,6 @@ struct rtc_class_ops { | |||
149 | int (*set_mmss)(struct device *, unsigned long secs); | 149 | int (*set_mmss)(struct device *, unsigned long secs); |
150 | int (*read_callback)(struct device *, int data); | 150 | int (*read_callback)(struct device *, int data); |
151 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); | 151 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); |
152 | int (*update_irq_enable)(struct device *, unsigned int enabled); | ||
153 | }; | 152 | }; |
154 | 153 | ||
155 | #define RTC_DEVICE_NAME_SIZE 20 | 154 | #define RTC_DEVICE_NAME_SIZE 20 |