/linux-2.6.39/drivers/char/ |
D | ds1302.c | 120 get_rtc_time(struct rtc_time *rtc_tm) in get_rtc_time() argument 126 rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); in get_rtc_time() 127 rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); in get_rtc_time() 128 rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); in get_rtc_time() 129 rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in get_rtc_time() 130 rtc_tm->tm_mon = CMOS_READ(RTC_MONTH); in get_rtc_time() 131 rtc_tm->tm_year = CMOS_READ(RTC_YEAR); in get_rtc_time() 135 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in get_rtc_time() 136 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in get_rtc_time() 137 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in get_rtc_time() [all …]
|
D | rtc.c | 147 static void rtc_get_rtc_time(struct rtc_time *rtc_tm); 548 struct rtc_time rtc_tm; in rtc_do_ioctl() local 559 if (copy_from_user(&rtc_tm, (struct rtc_time __user *)arg, in rtc_do_ioctl() 563 yrs = rtc_tm.tm_year + 1900; in rtc_do_ioctl() 564 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_do_ioctl() 565 day = rtc_tm.tm_mday; in rtc_do_ioctl() 566 hrs = rtc_tm.tm_hour; in rtc_do_ioctl() 567 min = rtc_tm.tm_min; in rtc_do_ioctl() 568 sec = rtc_tm.tm_sec; in rtc_do_ioctl() 1297 static void rtc_get_rtc_time(struct rtc_time *rtc_tm) in rtc_get_rtc_time() argument [all …]
|
/linux-2.6.39/arch/cris/arch-v10/drivers/ |
D | ds1302.c | 205 get_rtc_time(struct rtc_time *rtc_tm) in get_rtc_time() argument 211 rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); in get_rtc_time() 212 rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); in get_rtc_time() 213 rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); in get_rtc_time() 214 rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in get_rtc_time() 215 rtc_tm->tm_mon = CMOS_READ(RTC_MONTH); in get_rtc_time() 216 rtc_tm->tm_year = CMOS_READ(RTC_YEAR); in get_rtc_time() 220 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in get_rtc_time() 221 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in get_rtc_time() 222 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in get_rtc_time() [all …]
|
/linux-2.6.39/drivers/rtc/ |
D | rtc-ds1511.c | 185 static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) in ds1511_rtc_set_time() argument 193 if (rtc_tm->tm_year < 1900) { in ds1511_rtc_set_time() 194 rtc_tm->tm_year += 1900; in ds1511_rtc_set_time() 197 if (rtc_tm->tm_year < 1970) { in ds1511_rtc_set_time() 200 yrs = rtc_tm->tm_year % 100; in ds1511_rtc_set_time() 201 cen = rtc_tm->tm_year / 100; in ds1511_rtc_set_time() 202 mon = rtc_tm->tm_mon + 1; /* tm_mon starts at zero */ in ds1511_rtc_set_time() 203 day = rtc_tm->tm_mday; in ds1511_rtc_set_time() 204 dow = rtc_tm->tm_wday & 0x7; /* automatic BCD */ in ds1511_rtc_set_time() 205 hrs = rtc_tm->tm_hour; in ds1511_rtc_set_time() [all …]
|
D | rtc-s3c.c | 123 static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) in s3c_rtc_gettime() argument 129 rtc_tm->tm_min = readb(base + S3C2410_RTCMIN); in s3c_rtc_gettime() 130 rtc_tm->tm_hour = readb(base + S3C2410_RTCHOUR); in s3c_rtc_gettime() 131 rtc_tm->tm_mday = readb(base + S3C2410_RTCDATE); in s3c_rtc_gettime() 132 rtc_tm->tm_mon = readb(base + S3C2410_RTCMON); in s3c_rtc_gettime() 133 rtc_tm->tm_year = readb(base + S3C2410_RTCYEAR); in s3c_rtc_gettime() 134 rtc_tm->tm_sec = readb(base + S3C2410_RTCSEC); in s3c_rtc_gettime() 141 if (rtc_tm->tm_sec == 0 && !have_retried) { in s3c_rtc_gettime() 147 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, in s3c_rtc_gettime() 148 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); in s3c_rtc_gettime() [all …]
|
D | rtc-stmp3xxx.c | 51 static int stmp3xxx_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) in stmp3xxx_rtc_gettime() argument 56 rtc_time_to_tm(__raw_readl(rtc_data->io + HW_RTC_SECONDS), rtc_tm); in stmp3xxx_rtc_gettime()
|
D | rtc-isl1208.c | 366 struct rtc_time rtc_tm; in isl1208_i2c_set_alarm() local 369 err = isl1208_i2c_read_time(client, &rtc_tm); in isl1208_i2c_set_alarm() 372 err = rtc_tm_to_time(&rtc_tm, &rtc_secs); in isl1208_i2c_set_alarm()
|
/linux-2.6.39/arch/powerpc/kernel/ |
D | rtas-rtc.c | 45 void rtas_get_rtc_time(struct rtc_time *rtc_tm) in rtas_get_rtc_time() argument 59 memset(rtc_tm, 0, sizeof(struct rtc_time)); in rtas_get_rtc_time() 74 rtc_tm->tm_sec = ret[5]; in rtas_get_rtc_time() 75 rtc_tm->tm_min = ret[4]; in rtas_get_rtc_time() 76 rtc_tm->tm_hour = ret[3]; in rtas_get_rtc_time() 77 rtc_tm->tm_mday = ret[2]; in rtas_get_rtc_time() 78 rtc_tm->tm_mon = ret[1] - 1; in rtas_get_rtc_time() 79 rtc_tm->tm_year = ret[0] - 1900; in rtas_get_rtc_time()
|
/linux-2.6.39/arch/m68k/bvme6000/ |
D | rtc.c | 73 struct rtc_time rtc_tm; in rtc_ioctl() local 80 if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) in rtc_ioctl() 83 yrs = rtc_tm.tm_year; in rtc_ioctl() 86 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_ioctl() 87 day = rtc_tm.tm_mday; in rtc_ioctl() 88 hrs = rtc_tm.tm_hour; in rtc_ioctl() 89 min = rtc_tm.tm_min; in rtc_ioctl() 90 sec = rtc_tm.tm_sec; in rtc_ioctl() 119 if (rtc_tm.tm_wday >= 0) in rtc_ioctl() 120 rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1); in rtc_ioctl()
|
/linux-2.6.39/arch/m68k/mvme16x/ |
D | rtc.c | 68 struct rtc_time rtc_tm; in rtc_ioctl() local 75 if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) in rtc_ioctl() 78 yrs = rtc_tm.tm_year; in rtc_ioctl() 81 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_ioctl() 82 day = rtc_tm.tm_mday; in rtc_ioctl() 83 hrs = rtc_tm.tm_hour; in rtc_ioctl() 84 min = rtc_tm.tm_min; in rtc_ioctl() 85 sec = rtc_tm.tm_sec; in rtc_ioctl()
|
/linux-2.6.39/arch/unicore32/kernel/ |
D | rtc.c | 93 static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) in puv3_rtc_gettime() argument 95 rtc_time_to_tm(readl(RTC_RCNR), rtc_tm); in puv3_rtc_gettime() 98 rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, in puv3_rtc_gettime() 99 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); in puv3_rtc_gettime()
|
/linux-2.6.39/Documentation/ |
D | rtc.txt | 246 struct rtc_time rtc_tm; 330 retval = ioctl(fd, RTC_RD_TIME, &rtc_tm); 337 rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900, 338 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); 341 rtc_tm.tm_sec += 5; 342 if (rtc_tm.tm_sec >= 60) { 343 rtc_tm.tm_sec %= 60; 344 rtc_tm.tm_min++; 346 if (rtc_tm.tm_min == 60) { 347 rtc_tm.tm_min = 0; [all …]
|
/linux-2.6.39/arch/powerpc/platforms/iseries/ |
D | mf.c | 1251 void iSeries_get_rtc_time(struct rtc_time *rtc_tm) in iSeries_get_rtc_time() argument 1253 mf_get_rtc(rtc_tm); in iSeries_get_rtc_time() 1254 rtc_tm->tm_mon--; in iSeries_get_rtc_time()
|