/drivers/rtc/ |
H A D | rtc-lib.c | 33 int rtc_month_days(unsigned int month, unsigned int year) argument 35 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1); 42 int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) argument 44 return rtc_ydays[is_leap_year(year)][month] + day-1; 53 unsigned int month, year; local 62 year = 1970 + days / 365; 63 days -= (year - 1970) * 365 64 + LEAPS_THRU_END_OF(year - 1) 67 year -= 1; 68 days += 365 + is_leap_year(year); [all...] |
H A D | rtc-pcf8583.c | 177 unsigned char ctrl, year[2]; local 178 struct rtc_mem mem = { CMOS_YEAR, sizeof(year), year }; 199 real_year = year[0]; 202 * The RTC year holds the LSB two bits of the current 203 * year, which should reflect the LSB two bits of the 204 * CMOS copy of the year. Any difference indicates 210 * RTC year wrapped. Adjust it appropriately. 214 tm->tm_year = (real_year + year_offset + year[1] * 100) - 1900; 222 unsigned char year[ local [all...] |
H A D | rtc-efi.c | 30 * returns day of the year [0-365] 36 return rtc_year_days(eft->day - 1, eft->month - 1, eft->year); 41 * Don't try to provide a year that's before 1998, please ! 49 if (eft->year < 1998) { 50 printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n"); 54 for (y = EFI_RTC_EPOCH; y < eft->year; y++) 68 eft->year = wtime->tm_year + 1900; 88 wtime->tm_year = eft->year - 1900; 93 /* day in the year [1-365]*/
|
H A D | rtc-mv.c | 71 unsigned int year, month, day, hour, minute, second, wday; local 83 year = (rtc_date >> RTC_YEAR_OFFS) & 0xff; 91 /* hw counts from year 2000, but tm_year is relative to 1900 */ 92 tm->tm_year = bcd2bin(year) + 100; 102 unsigned int year, month, day, hour, minute, second, wday; local 114 year = (rtc_date >> RTC_YEAR_OFFS) & 0xff; 122 /* hw counts from year 2000, but tm_year is relative to 1900 */ 123 alm->time.tm_year = bcd2bin(year) + 100;
|
H A D | rtc-bq4802.c | 98 unsigned int year; local 100 year = tm->tm_year + 1900; 101 century = year / 100; 102 yrs = year % 100;
|
H A D | rtc-r9701.c | 100 int ret, year; local 102 year = dt->tm_year + 1900; 103 if (year >= 2100 || year < 2000)
|
H A D | rtc-m48t59.c | 118 int year = tm->tm_year; local 122 year -= 68; 126 year + 1900, tm->tm_mon, tm->tm_mday, 129 if (year < 0) 142 M48T59_WRITE(bin2bcd(year % 100), M48T59_YEAR); 144 if (pdata->type == M48T59RTC_TYPE_M48T59 && (year / 100)) 213 int year = tm->tm_year; local 217 year -= 68; 224 if (year < 0) 258 year [all...] |
H A D | rtc-ds1216.c | 24 u8 year; member in struct:ds1216_regs 102 tm->tm_year = bcd2bin(regs.year); 131 regs.year = bin2bcd(tm->tm_year % 100);
|
H A D | rtc-m48t35.c | 35 u8 year; member in struct:m48t35_rtc 68 tm->tm_year = readb(&priv->reg->year); 128 writeb(yrs, &priv->reg->year);
|
H A D | rtc-davinci.c | 247 int tmp_days, year, mon; local 249 for (year = 2000;; year++) { 250 tmp_days = rtc_year_days(1, 12, year); 255 tmp_days = rtc_month_days(mon, year); 259 tm->tm_year = year - 1900;
|
H A D | rtc-ds1742.c | 94 unsigned int year, month, day, hour, minute, second, week; local 108 year = readb(ioaddr + RTC_YEAR); 117 /* year is 1900 + tm->tm_year */ 118 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900;
|
H A D | rtc-ds1553.c | 106 unsigned int year, month, day, hour, minute, second, week; local 120 year = readb(ioaddr + RTC_YEAR); 129 /* year is 1900 + tm->tm_year */ 130 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900;
|
H A D | rtc-ds3232.c | 105 unsigned int year, month, day, hour, minute, second; local 122 year = buf[6]; 152 time->tm_year = bcd2bin(year) + add_century;
|
H A D | rtc-pl031.c | 104 int year = tm->tm_year + 1900; local 121 *bcd_year = (bin2bcd(year % 100) | bin2bcd(year / 100) << 8);
|
H A D | rtc-stk17ta8.c | 105 unsigned int year, month, day, hour, minute, second, week; local 122 year = readb(ioaddr + RTC_YEAR); 131 /* year is 1900 + tm->tm_year */ 132 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900;
|
H A D | rtc-s3c.c | 221 int year = tm->tm_year - 100; local 229 if (year < 0 || year >= 100) { 240 writeb(bin2bcd(year), base + S3C2410_RTCYEAR);
|
H A D | rtc-ab8500.c | 61 static unsigned long get_elapsed_seconds(int year) argument 65 .tm_year = year - 1900, 71 * 1900, even if we supply the offset from year 1900. 138 dev_dbg(dev, "year should be equal to or greater than %d\n", 230 dev_dbg(dev, "year should be equal to or greater than %d\n",
|
/drivers/char/ |
H A D | efirtc.c | 54 #define is_leap(year) \ 55 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) 66 * returns day of the year [0-365] 72 return __mon_yday[is_leap(eft->year)][eft->month-1]+ eft->day -1; 77 * Don't try to provide a year that's before 1998, please ! 85 if ( eft->year < 1998 ) { 86 printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n"); 90 for(y=EFI_RTC_EPOCH; y < eft->year; [all...] |
H A D | genrtc.c | 303 int year; local 312 year = wtime.tm_year + 1900; 313 leap_yr = ((!(year % 4) && (year % 100)) || 314 !(year % 400));
|
H A D | rtc.c | 43 * 1.10e Maciej W. Rozycki: Handle DECstation's year weirdness. 209 static unsigned long epoch = 1900; /* year corresponding to 0x00 */ 594 * We want to keep the year set to 73 until March 959 unsigned int year, ctrl; local 1084 year = CMOS_READ(RTC_YEAR); 1089 year = bcd2bin(year); /* This should never happen... */ 1091 if (year < 20) { 1094 } else if (year >= 20 && year < 4 [all...] |
H A D | toshiba.c | 430 int i,major,minor,day,year,month,flag; local 482 year = ((readb(bios+0xfffb)-'0')*10)+(readb(bios+0xfffc)-'0'); 483 tosh_date = (((year-90) & 0x1f)<<10) | ((month & 0xf)<<6)
|
/drivers/acpi/ |
H A D | blacklist.c | 82 int year; local 85 if (!dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL)) { 86 printk(KERN_ERR PREFIX "no DMI BIOS year, " 91 if (year == 0) { 92 printk(KERN_ERR PREFIX "DMI BIOS year==0, " 96 if (year < CONFIG_ACPI_BLACKLIST_YEAR) { 99 year, CONFIG_ACPI_BLACKLIST_YEAR);
|
/drivers/net/can/usb/peak_usb/ |
H A D | pcan_usb_pro.h | 39 u8 year; member in struct:pcan_usb_pro_blinfo 53 u8 year; member in struct:pcan_usb_pro_fwinfo
|
/drivers/firmware/ |
H A D | dmi_scan.c | 638 * @yearp: optional out parameter for the year 650 * On return, year, month and day are guaranteed to be in the 655 int year = 0, month = 0, day = 0; local 666 * Determine year first. We assume the date string resembles 667 * mm/dd/yy[yy] but the original code extracted only the year 676 year = simple_strtoul(y, &e, 10); 677 if (y != e && year < 100) { /* 2-digit year */ 678 year += 1900; 679 if (year < 199 [all...] |
/drivers/isdn/hardware/eicon/ |
H A D | s_4bri.c | 190 dword fpgaFlen, fpgaTlen, fpgaDlen, cnt, year, i; local 246 year = 0; 248 year = year * 10 + (fpgaDate[i++] - '0'); 249 } while ((year < 2000) && (fpgaDate[i] != '\0')); 256 if (year >= 2001) {
|