aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-cmos.c12
-rw-r--r--drivers/rtc/rtc-ds1305.c2
-rw-r--r--drivers/rtc/rtc-ds1307.c2
-rw-r--r--drivers/rtc/rtc-ds1374.c2
4 files changed, 11 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index eb154dc57164..e9aa814ddd23 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -686,7 +686,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
686 */ 686 */
687#if defined(CONFIG_ATARI) 687#if defined(CONFIG_ATARI)
688 address_space = 64; 688 address_space = 64;
689#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__) 689#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \
690 || defined(__sparc__) || defined(__mips__)
690 address_space = 128; 691 address_space = 128;
691#else 692#else
692#warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes. 693#warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
@@ -1095,9 +1096,9 @@ static int cmos_pnp_resume(struct pnp_dev *pnp)
1095#define cmos_pnp_resume NULL 1096#define cmos_pnp_resume NULL
1096#endif 1097#endif
1097 1098
1098static void cmos_pnp_shutdown(struct device *pdev) 1099static void cmos_pnp_shutdown(struct pnp_dev *pnp)
1099{ 1100{
1100 if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(pdev)) 1101 if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pnp->dev))
1101 return; 1102 return;
1102 1103
1103 cmos_do_shutdown(); 1104 cmos_do_shutdown();
@@ -1116,15 +1117,12 @@ static struct pnp_driver cmos_pnp_driver = {
1116 .id_table = rtc_ids, 1117 .id_table = rtc_ids,
1117 .probe = cmos_pnp_probe, 1118 .probe = cmos_pnp_probe,
1118 .remove = __exit_p(cmos_pnp_remove), 1119 .remove = __exit_p(cmos_pnp_remove),
1120 .shutdown = cmos_pnp_shutdown,
1119 1121
1120 /* flag ensures resume() gets called, and stops syslog spam */ 1122 /* flag ensures resume() gets called, and stops syslog spam */
1121 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 1123 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
1122 .suspend = cmos_pnp_suspend, 1124 .suspend = cmos_pnp_suspend,
1123 .resume = cmos_pnp_resume, 1125 .resume = cmos_pnp_resume,
1124 .driver = {
1125 .name = (char *)driver_name,
1126 .shutdown = cmos_pnp_shutdown,
1127 }
1128}; 1126};
1129 1127
1130#endif /* CONFIG_PNP */ 1128#endif /* CONFIG_PNP */
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 259db7f3535b..9630e7d3314e 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -778,6 +778,8 @@ static int __devinit ds1305_probe(struct spi_device *spi)
778 spi->irq, status); 778 spi->irq, status);
779 goto fail1; 779 goto fail1;
780 } 780 }
781
782 device_set_wakeup_capable(&spi->dev, 1);
781 } 783 }
782 784
783 /* export NVRAM */ 785 /* export NVRAM */
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 8a99da6f2f24..c4ec5c158aa1 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -881,6 +881,8 @@ read_rtc:
881 "unable to request IRQ!\n"); 881 "unable to request IRQ!\n");
882 goto exit_irq; 882 goto exit_irq;
883 } 883 }
884
885 device_set_wakeup_capable(&client->dev, 1);
884 set_bit(HAS_ALARM, &ds1307->flags); 886 set_bit(HAS_ALARM, &ds1307->flags);
885 dev_dbg(&client->dev, "got IRQ %d\n", client->irq); 887 dev_dbg(&client->dev, "got IRQ %d\n", client->irq);
886 } 888 }
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 713f7bf5afb3..5317bbcbc7a0 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -383,6 +383,8 @@ static int ds1374_probe(struct i2c_client *client,
383 dev_err(&client->dev, "unable to request IRQ\n"); 383 dev_err(&client->dev, "unable to request IRQ\n");
384 goto out_free; 384 goto out_free;
385 } 385 }
386
387 device_set_wakeup_capable(&client->dev, 1);
386 } 388 }
387 389
388 ds1374->rtc = rtc_device_register(client->name, &client->dev, 390 ds1374->rtc = rtc_device_register(client->name, &client->dev,