Home
last modified time | relevance | path

Searched refs:yrs (Results 1 – 10 of 10) sorted by relevance

/Linux-v4.19/drivers/rtc/
Drtc-mc146818-lib.c107 unsigned int yrs; in mc146818_set_time() local
113 yrs = time->tm_year; in mc146818_set_time()
120 if (yrs > 255) /* They are unsigned */ in mc146818_set_time()
125 real_yrs = yrs; in mc146818_set_time()
126 leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || in mc146818_set_time()
127 !((yrs + 1900) % 400)); in mc146818_set_time()
128 yrs = 72; in mc146818_set_time()
137 yrs = 73; in mc146818_set_time()
144 century = (yrs + 1900) / 100; in mc146818_set_time()
145 yrs %= 100; in mc146818_set_time()
[all …]
Drtc-m48t35.c94 unsigned int yrs; in m48t35_set_time() local
97 yrs = tm->tm_year + 1900; in m48t35_set_time()
104 if (yrs < 1970) in m48t35_set_time()
107 yrs -= 1970; in m48t35_set_time()
108 if (yrs > 255) /* They are unsigned */ in m48t35_set_time()
111 if (yrs > 169) in m48t35_set_time()
114 if (yrs >= 100) in m48t35_set_time()
115 yrs -= 100; in m48t35_set_time()
122 yrs = bin2bcd(yrs); in m48t35_set_time()
127 writeb(yrs, &priv->reg->year); in m48t35_set_time()
Drtc-ds1286.c222 unsigned int yrs; in ds1286_set_time() local
225 yrs = tm->tm_year + 1900; in ds1286_set_time()
232 if (yrs < 1970) in ds1286_set_time()
235 yrs -= 1940; in ds1286_set_time()
236 if (yrs > 255) /* They are unsigned */ in ds1286_set_time()
239 if (yrs >= 100) in ds1286_set_time()
240 yrs -= 100; in ds1286_set_time()
247 yrs = bin2bcd(yrs); in ds1286_set_time()
253 ds1286_rtc_write(priv, yrs, RTC_YEAR); in ds1286_set_time()
Drtc-bq4802.c94 u8 sec, min, hrs, day, mon, yrs, century, val; in bq4802_set_time() local
100 yrs = year % 100; in bq4802_set_time()
113 yrs = bin2bcd(yrs); in bq4802_set_time()
126 p->write(p, 0x0a, yrs); in bq4802_set_time()
Drtc-mrst.c115 unsigned int yrs; in mrst_set_time() local
117 yrs = time->tm_year; in mrst_set_time()
124 if (yrs < 72 || yrs > 172) in mrst_set_time()
126 yrs -= 72; in mrst_set_time()
130 vrtc_cmos_write(yrs, RTC_YEAR); in mrst_set_time()
Drtc-ds1511.c185 u8 mon, day, dow, hrs, min, sec, yrs, cen; in ds1511_rtc_set_time() local
197 yrs = rtc_tm->tm_year % 100; in ds1511_rtc_set_time()
223 yrs = bin2bcd(yrs) & 0xff; in ds1511_rtc_set_time()
229 rtc_write(yrs, RTC_YEAR); in ds1511_rtc_set_time()
/Linux-v4.19/arch/m68k/bvme6000/
Drtc.c75 unsigned int yrs; in rtc_ioctl() local
83 yrs = rtc_tm.tm_year; in rtc_ioctl()
84 if (yrs < 1900) in rtc_ioctl()
85 yrs += 1900; in rtc_ioctl()
92 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
103 if (yrs >= 2070) in rtc_ioctl()
111 rtc->t0cr_rtmr = yrs%4; in rtc_ioctl()
118 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl()
121 rtc->t0cr_rtmr = yrs%4 | 0x08; in rtc_ioctl()
/Linux-v4.19/arch/m68k/mvme16x/
Drtc.c70 unsigned int yrs; in rtc_ioctl() local
78 yrs = rtc_tm.tm_year; in rtc_ioctl()
79 if (yrs < 1900) in rtc_ioctl()
80 yrs += 1900; in rtc_ioctl()
87 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
98 if (yrs >= 2070) in rtc_ioctl()
109 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl()
/Linux-v4.19/drivers/char/
Drtc.c538 unsigned int yrs; in rtc_do_ioctl() local
550 yrs = rtc_tm.tm_year + 1900; in rtc_do_ioctl()
557 if (yrs < 1970) in rtc_do_ioctl()
560 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_do_ioctl()
571 yrs -= epoch; in rtc_do_ioctl()
572 if (yrs > 255) /* They are unsigned */ in rtc_do_ioctl()
577 real_yrs = yrs; in rtc_do_ioctl()
578 yrs = 72; in rtc_do_ioctl()
587 yrs = 73; in rtc_do_ioctl()
593 if (yrs > 169) { in rtc_do_ioctl()
[all …]
/Linux-v4.19/drivers/input/misc/
Dhp_sdc_rtc.c602 unsigned int yrs; in hp_sdc_rtc_ioctl()
610 yrs = hp_sdc_rtc_tm.tm_year + 1900; in hp_sdc_rtc_ioctl()
617 if (yrs < 1970) in hp_sdc_rtc_ioctl()
620 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in hp_sdc_rtc_ioctl()
629 if ((yrs -= eH) > 255) /* They are unsigned */ in hp_sdc_rtc_ioctl()