aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/Makefile42
-rw-r--r--drivers/rtc/class.c5
-rw-r--r--drivers/rtc/rtc-ds1307.c2
-rw-r--r--drivers/rtc/rtc-stk17ta8.c6
4 files changed, 30 insertions, 25 deletions
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7ede9e725360..d3a33aa2696f 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -15,34 +15,36 @@ rtc-core-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o
15rtc-core-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o 15rtc-core-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o
16rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o 16rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o
17 17
18# Keep the list ordered.
19
20obj-$(CONFIG_RTC_DRV_AT32AP700X)+= rtc-at32ap700x.o
21obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
22obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o
18obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o 23obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o
19obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o 24obj-$(CONFIG_RTC_DRV_DS1216) += rtc-ds1216.o
20obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
21obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
22obj-$(CONFIG_RTC_DRV_AT32AP700X) += rtc-at32ap700x.o
23obj-$(CONFIG_RTC_DRV_DS1307) += rtc-ds1307.o 25obj-$(CONFIG_RTC_DRV_DS1307) += rtc-ds1307.o
26obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o
24obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o 27obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o
25obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o 28obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o
29obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
30obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
31obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o
32obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o
33obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o
34obj-$(CONFIG_RTC_DRV_MAX6900) += rtc-max6900.o
35obj-$(CONFIG_RTC_DRV_MAX6902) += rtc-max6902.o
26obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o 36obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
27obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o 37obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
28obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o 38obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
39obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o
40obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o
41obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o
29obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o 42obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o
30obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o 43obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
31obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o
32obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o
33obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o
34obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o
35obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
36obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o
37obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
38obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o 44obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
39obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o
40obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o
41obj-$(CONFIG_RTC_DRV_MAX6900) += rtc-max6900.o
42obj-$(CONFIG_RTC_DRV_MAX6902) += rtc-max6902.o
43obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o
44obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
45obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o 45obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o
46obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o 46obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
47obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o 47obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
48obj-$(CONFIG_RTC_DRV_DS1216) += rtc-ds1216.o 48obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o
49obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o
50obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 8b3cd31d6a61..10ab3b71ffc6 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -46,6 +46,7 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg)
46{ 46{
47 struct rtc_device *rtc = to_rtc_device(dev); 47 struct rtc_device *rtc = to_rtc_device(dev);
48 struct rtc_time tm; 48 struct rtc_time tm;
49 struct timespec ts = current_kernel_time();
49 50
50 if (strncmp(rtc->dev.bus_id, 51 if (strncmp(rtc->dev.bus_id,
51 CONFIG_RTC_HCTOSYS_DEVICE, 52 CONFIG_RTC_HCTOSYS_DEVICE,
@@ -57,8 +58,8 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg)
57 58
58 /* RTC precision is 1 second; adjust delta for avg 1/2 sec err */ 59 /* RTC precision is 1 second; adjust delta for avg 1/2 sec err */
59 set_normalized_timespec(&delta, 60 set_normalized_timespec(&delta,
60 xtime.tv_sec - oldtime, 61 ts.tv_sec - oldtime,
61 xtime.tv_nsec - (NSEC_PER_SEC >> 1)); 62 ts.tv_nsec - (NSEC_PER_SEC >> 1));
62 63
63 return 0; 64 return 0;
64} 65}
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 5158a625671f..db6f3f0d8982 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -352,7 +352,7 @@ read_rtc:
352 /* oscillator fault? clear flag, and warn */ 352 /* oscillator fault? clear flag, and warn */
353 if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) { 353 if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) {
354 i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL, 354 i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL,
355 ds1307->regs[DS1337_REG_CONTROL] 355 ds1307->regs[DS1307_REG_CONTROL]
356 & ~DS1338_BIT_OSF); 356 & ~DS1338_BIT_OSF);
357 dev_warn(&client->dev, "SET TIME!\n"); 357 dev_warn(&client->dev, "SET TIME!\n");
358 goto read_rtc; 358 goto read_rtc;
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index f10d3facecbe..8288b6b2bf2b 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -258,7 +258,8 @@ static const struct rtc_class_ops stk17ta8_rtc_ops = {
258 .ioctl = stk17ta8_rtc_ioctl, 258 .ioctl = stk17ta8_rtc_ioctl,
259}; 259};
260 260
261static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf, 261static ssize_t stk17ta8_nvram_read(struct kobject *kobj,
262 struct bin_attribute *attr, char *buf,
262 loff_t pos, size_t size) 263 loff_t pos, size_t size)
263{ 264{
264 struct platform_device *pdev = 265 struct platform_device *pdev =
@@ -272,7 +273,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf,
272 return count; 273 return count;
273} 274}
274 275
275static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf, 276static ssize_t stk17ta8_nvram_write(struct kobject *kobj,
277 struct bin_attribute *attr, char *buf,
276 loff_t pos, size_t size) 278 loff_t pos, size_t size)
277{ 279{
278 struct platform_device *pdev = 280 struct platform_device *pdev =