Searched refs:year (Results 1 - 25 of 47) sorted by relevance

12

/drivers/rtc/
H A Drtc-lib.c33 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 Drtc-pcf8583.c178 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 Drtc-efi.c33 * 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 Drtc-lp8788.c142 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 Drtc-mv.c73 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 Drtc-bq4802.c98 unsigned int year; local
100 year = tm->tm_year + 1900;
101 century = year / 100;
102 yrs = year % 100;
H A Drtc-r9701.c100 int ret, year; local
102 year = dt->tm_year + 1900;
103 if (year >= 2100 || year < 2000)
H A Drtc-m48t59.c118 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 Drtc-da9063.c27 #define YEARS_TO_DA9063(year) ((year) - 100)
29 #define YEARS_FROM_DA9063(year) ((year) + 100)
H A Drtc-ds1216.c24 u8 year; member in struct:ds1216_regs
100 tm->tm_year = bcd2bin(regs.year);
129 regs.year = bin2bcd(tm->tm_year % 100);
H A Drtc-m48t35.c36 u8 year; member in struct:m48t35_rtc
69 tm->tm_year = readb(&priv->reg->year);
129 writeb(yrs, &priv->reg->year);
H A Drtc-sun6i.c100 * 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 Drtc-sunxi.c119 * 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 Drtc-davinci.c245 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 Drtc-ds1742.c93 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 Drtc-ds1553.c106 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 Drtc-ds3232.c106 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 Defirtc.c55 #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 Dgenrtc.c304 int year; local
313 year = wtime.tm_year + 1900;
314 leap_yr = ((!(year % 4) && (year % 100)) ||
315 !(year % 400));
H A Drtc.c43 * 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 Dtoshiba.c430 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 Dpcan_usb_pro.h40 u8 year; member in struct:pcan_usb_pro_blinfo
54 u8 year; member in struct:pcan_usb_pro_fwinfo
/drivers/firmware/
H A Ddmi_scan.c815 * @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 Ds_4bri.c190 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 Dsleep.c326 int year; local
328 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012)

Completed in 258 milliseconds

12