Lines Matching full:year
61 * The year parameter passed to the driver is usually an offset relative to
62 * the year 1900. This macro is used to convert this offset to another one
63 * relative to the minimum year allowed by the hardware.
65 * The year range is 1970 - 2069. This range is selected to match Allwinner's
411 int year; in ac100_rtc_set_time() local
414 /* our RTC has a limited year range... */ in ac100_rtc_set_time()
415 year = rtc_tm->tm_year - AC100_YEAR_OFF; in ac100_rtc_set_time()
416 if (year < 0 || year > (AC100_YEAR_MAX - 1900)) { in ac100_rtc_set_time()
417 dev_err(dev, "rtc only supports year in range %d - %d\n", in ac100_rtc_set_time()
429 reg[6] = bin2bcd(year) & AC100_RTC_YEA_MASK; in ac100_rtc_set_time()
433 /* Is it a leap year? */ in ac100_rtc_set_time()
434 if (is_leap_year(year + AC100_YEAR_OFF + 1900)) in ac100_rtc_set_time()
488 int year; in ac100_rtc_set_alarm() local
491 /* our alarm has a limited year range... */ in ac100_rtc_set_alarm()
492 year = alrm_tm->tm_year - AC100_YEAR_OFF; in ac100_rtc_set_alarm()
493 if (year < 0 || year > (AC100_YEAR_MAX - 1900)) { in ac100_rtc_set_alarm()
494 dev_err(dev, "alarm only supports year in range %d - %d\n", in ac100_rtc_set_alarm()
512 reg[6] = (bin2bcd(year) & AC100_ALM_YEA_MASK) | in ac100_rtc_set_alarm()