/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 | 178 unsigned char ctrl, year[2]; local 181 .nr = sizeof(year), 182 .data = year 205 real_year = year[0]; 208 * The RTC year holds the LSB two bits of the current 209 * year, which should reflect the LSB two bits of the 210 * CMOS copy of the year. Any difference indicates 216 * RTC year wrapped. Adjust it appropriately. 220 tm->tm_year = (real_year + year_offset + year[1] * 100) - 1900; 228 unsigned char year[ local [all...] |
H A D | rtc-efi.c | 33 * returns day of the year [0-365] 39 return rtc_year_days(eft->day, eft->month - 1, eft->year); 44 * Don't try to provide a year that's before 1998, please ! 52 if (eft->year < EFI_RTC_EPOCH) { 53 pr_err("EFI year < " __stringify(EFI_RTC_EPOCH) ", invalid date\n"); 57 for (y = EFI_RTC_EPOCH; y < eft->year; y++) 71 eft->year = wtime->tm_year + 1900; 106 wtime->tm_year = eft->year - 1900; 113 /* day in the year [1-365]*/
|
H A D | rtc-lp8788.c | 142 int ret, i, year; local 144 year = tm->tm_year + 1900 - LP8788_BASE_YEAR; 145 if (year < 0) { 146 dev_err(lp->dev, "invalid year: %d\n", year); 156 data[LPTIME_YEAR] = year; 198 int ret, i, year; local 200 year = tm->tm_year + 1900 - LP8788_BASE_YEAR; 201 if (year < 0) { 202 dev_err(lp->dev, "invalid year [all...] |
H A D | rtc-mv.c | 73 unsigned int year, month, day, hour, minute, second, wday; local 85 year = (rtc_date >> RTC_YEAR_OFFS) & 0xff; 93 /* hw counts from year 2000, but tm_year is relative to 1900 */ 94 tm->tm_year = bcd2bin(year) + 100; 104 unsigned int year, month, day, hour, minute, second, wday; local 116 year = (rtc_date >> RTC_YEAR_OFFS) & 0xff; 124 /* hw counts from year 2000, but tm_year is relative to 1900 */ 125 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-da9063.c | 27 #define YEARS_TO_DA9063(year) ((year) - 100) 29 #define YEARS_FROM_DA9063(year) ((year) + 100)
|
H A D | rtc-ds1216.c | 24 u8 year; member in struct:ds1216_regs 100 tm->tm_year = bcd2bin(regs.year); 129 regs.year = bin2bcd(tm->tm_year % 100);
|
H A D | rtc-m48t35.c | 36 u8 year; member in struct:m48t35_rtc 69 tm->tm_year = readb(&priv->reg->year); 129 writeb(yrs, &priv->reg->year);
|
H A D | rtc-sun6i.c | 100 * The year parameter passed to the driver is usually an offset relative to 101 * the year 1900. This macro is used to convert this offset to another one 102 * relative to the minimum year allowed by the hardware. 104 * The year range is 1970 - 2033. This range is selected to match Allwinner's 271 int year; local 273 year = rtc_tm->tm_year + 1900; 274 if (year < SUN6I_YEAR_MIN || year > SUN6I_YEAR_MAX) { 275 dev_err(dev, "rtc only supports year in range %d - %d\n", 287 if (is_leap_year(year)) [all...] |
H A D | rtc-sunxi.c | 119 * The year parameter passed to the driver is usually an offset relative to 120 * the year 1900. This macro is used to convert this offset to another one 121 * relative to the minimum year allowed by the hardware. 126 * min and max year are arbitrary set considering the limited range of the 130 unsigned int min; /* min year allowed */ 131 unsigned int max; /* max year allowed */ 132 unsigned int mask; /* mask for the year field */ 133 unsigned char leap_shift; /* bit shift to get the leap year */ 348 int year; local 352 * the SUNXI_YEAR_OFF macro to rebase it with respect to the min year [all...] |
H A D | rtc-davinci.c | 245 int tmp_days, year, mon; local 247 for (year = 2000;; year++) { 248 tmp_days = rtc_year_days(1, 12, year); 253 tmp_days = rtc_month_days(mon, year); 257 tm->tm_year = year - 1900;
|
H A D | rtc-ds1742.c | 93 unsigned int year, month, day, hour, minute, second, week; local 107 year = readb(ioaddr + RTC_YEAR); 116 /* year is 1900 + tm->tm_year */ 117 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 | 106 unsigned int year, month, day, hour, minute, second; local 123 year = buf[6]; 153 time->tm_year = bcd2bin(year) + add_century;
|
/drivers/char/ |
H A D | efirtc.c | 55 #define is_leap(year) \ 56 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) 67 * returns day of the year [0-365] 73 return __mon_yday[is_leap(eft->year)][eft->month-1]+ eft->day -1; 78 * Don't try to provide a year that's before 1998, please ! 86 if ( eft->year < 1998 ) { 87 printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n"); 91 for(y=EFI_RTC_EPOCH; y < eft->year; [all...] |
H A D | genrtc.c | 304 int year; local 313 year = wtime.tm_year + 1900; 314 leap_yr = ((!(year % 4) && (year % 100)) || 315 !(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 1083 year = CMOS_READ(RTC_YEAR); 1088 year = bcd2bin(year); /* This should never happen... */ 1090 if (year < 20) { 1093 } 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/net/can/usb/peak_usb/ |
H A D | pcan_usb_pro.h | 40 u8 year; member in struct:pcan_usb_pro_blinfo 54 u8 year; member in struct:pcan_usb_pro_fwinfo
|
/drivers/firmware/ |
H A D | dmi_scan.c | 815 * @yearp: optional out parameter for the year 827 * On return, year, month and day are guaranteed to be in the 832 int year = 0, month = 0, day = 0; local 843 * Determine year first. We assume the date string resembles 844 * mm/dd/yy[yy] but the original code extracted only the year 853 year = simple_strtoul(y, &e, 10); 854 if (y != e && year < 100) { /* 2-digit year */ 855 year += 1900; 856 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) {
|
/drivers/acpi/ |
H A D | sleep.c | 326 int year; local 328 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012)
|