Home
last modified time | relevance | path

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

/linux-6.1.9/drivers/rtc/
Drtc-mc146818-lib.c196 unsigned int yrs; in mc146818_set_time() local
202 yrs = time->tm_year; in mc146818_set_time()
209 if (yrs > 255) /* They are unsigned */ in mc146818_set_time()
213 real_yrs = yrs; in mc146818_set_time()
214 leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || in mc146818_set_time()
215 !((yrs + 1900) % 400)); in mc146818_set_time()
216 yrs = 72; in mc146818_set_time()
225 yrs = 73; in mc146818_set_time()
232 century = (yrs + 1900) / 100; in mc146818_set_time()
233 yrs %= 100; in mc146818_set_time()
[all …]
Drtc-m48t35.c101 unsigned int yrs; in m48t35_set_time() local
104 yrs = tm->tm_year + 1900; in m48t35_set_time()
111 if (yrs < 1970) in m48t35_set_time()
114 yrs -= 1970; in m48t35_set_time()
115 if (yrs > 255) /* They are unsigned */ in m48t35_set_time()
118 if (yrs > 169) in m48t35_set_time()
121 if (yrs >= 100) in m48t35_set_time()
122 yrs -= 100; in m48t35_set_time()
129 yrs = bin2bcd(yrs); in m48t35_set_time()
134 writeb(yrs, &priv->reg->year); in m48t35_set_time()
Drtc-ds1286.c218 unsigned int yrs; in ds1286_set_time() local
221 yrs = tm->tm_year + 1900; in ds1286_set_time()
228 if (yrs < 1970) in ds1286_set_time()
231 yrs -= 1940; in ds1286_set_time()
232 if (yrs > 255) /* They are unsigned */ in ds1286_set_time()
235 if (yrs >= 100) in ds1286_set_time()
236 yrs -= 100; in ds1286_set_time()
243 yrs = bin2bcd(yrs); in ds1286_set_time()
249 ds1286_rtc_write(priv, yrs, RTC_YEAR); in ds1286_set_time()
Drtc-bq4802.c95 u8 sec, min, hrs, day, mon, yrs, century, val; in bq4802_set_time() local
101 yrs = year % 100; in bq4802_set_time()
114 yrs = bin2bcd(yrs); in bq4802_set_time()
127 p->write(p, 0x0a, yrs); in bq4802_set_time()
Drtc-ds1511.c176 u8 mon, day, dow, hrs, min, sec, yrs, cen; in ds1511_rtc_set_time() local
188 yrs = rtc_tm->tm_year % 100; in ds1511_rtc_set_time()
214 yrs = bin2bcd(yrs) & 0xff; in ds1511_rtc_set_time()
220 rtc_write(yrs, RTC_YEAR); in ds1511_rtc_set_time()
/linux-6.1.9/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-6.1.9/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()