Home
last modified time | relevance | path

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

/linux-3.4.99/include/asm-generic/
Drtc.h121 unsigned int yrs; in __set_rtc_time() local
126 yrs = time->tm_year; in __set_rtc_time()
133 if (yrs > 255) /* They are unsigned */ in __set_rtc_time()
138 real_yrs = yrs; in __set_rtc_time()
139 leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || in __set_rtc_time()
140 !((yrs + 1900) % 400)); in __set_rtc_time()
141 yrs = 72; in __set_rtc_time()
150 yrs = 73; in __set_rtc_time()
156 if (yrs > 169) { in __set_rtc_time()
161 if (yrs >= 100) in __set_rtc_time()
[all …]
/linux-3.4.99/arch/m68k/bvme6000/
Drtc.c74 unsigned int yrs; in rtc_ioctl() local
82 yrs = rtc_tm.tm_year; in rtc_ioctl()
83 if (yrs < 1900) in rtc_ioctl()
84 yrs += 1900; in rtc_ioctl()
91 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
102 if (yrs >= 2070) in rtc_ioctl()
110 rtc->t0cr_rtmr = yrs%4; in rtc_ioctl()
117 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl()
120 rtc->t0cr_rtmr = yrs%4 | 0x08; in rtc_ioctl()
/linux-3.4.99/drivers/char/
Dds1302.c179 unsigned int yrs; in rtc_ioctl() local
187 yrs = rtc_tm.tm_year + 1900; in rtc_ioctl()
195 if ((yrs < 1970) || (yrs > 2069)) in rtc_ioctl()
198 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
209 if (yrs >= 2000) in rtc_ioctl()
210 yrs -= 2000; /* RTC (0, 1, ... 69) */ in rtc_ioctl()
212 yrs -= 1900; /* RTC (70, 71, ... 99) */ in rtc_ioctl()
219 yrs = bin2bcd(yrs); in rtc_ioctl()
223 CMOS_WRITE(yrs, RTC_YEAR); in rtc_ioctl()
Drtc.c551 unsigned int yrs; in rtc_do_ioctl() local
563 yrs = rtc_tm.tm_year + 1900; in rtc_do_ioctl()
570 if (yrs < 1970) in rtc_do_ioctl()
573 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_do_ioctl()
584 yrs -= epoch; in rtc_do_ioctl()
585 if (yrs > 255) /* They are unsigned */ in rtc_do_ioctl()
590 real_yrs = yrs; in rtc_do_ioctl()
591 yrs = 72; in rtc_do_ioctl()
600 yrs = 73; in rtc_do_ioctl()
606 if (yrs > 169) { in rtc_do_ioctl()
[all …]
/linux-3.4.99/arch/m68k/mvme16x/
Drtc.c69 unsigned int yrs; in rtc_ioctl() local
77 yrs = rtc_tm.tm_year; in rtc_ioctl()
78 if (yrs < 1900) in rtc_ioctl()
79 yrs += 1900; in rtc_ioctl()
86 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
97 if (yrs >= 2070) in rtc_ioctl()
108 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl()
/linux-3.4.99/arch/cris/arch-v10/drivers/
Dds1302.c262 unsigned int yrs; in rtc_ioctl() local
270 yrs = rtc_tm.tm_year + 1900; in rtc_ioctl()
278 if ((yrs < 1970) || (yrs > 2069)) in rtc_ioctl()
281 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in rtc_ioctl()
292 if (yrs >= 2000) in rtc_ioctl()
293 yrs -= 2000; /* RTC (0, 1, ... 69) */ in rtc_ioctl()
295 yrs -= 1900; /* RTC (70, 71, ... 99) */ in rtc_ioctl()
302 yrs = bin2bcd(yrs); in rtc_ioctl()
305 CMOS_WRITE(yrs, RTC_YEAR); in rtc_ioctl()
/linux-3.4.99/drivers/rtc/
Drtc-m48t35.c95 unsigned int yrs; in m48t35_set_time() local
98 yrs = tm->tm_year + 1900; in m48t35_set_time()
105 if (yrs < 1970) in m48t35_set_time()
108 yrs -= 1970; in m48t35_set_time()
109 if (yrs > 255) /* They are unsigned */ in m48t35_set_time()
112 if (yrs > 169) in m48t35_set_time()
115 if (yrs >= 100) in m48t35_set_time()
116 yrs -= 100; in m48t35_set_time()
123 yrs = bin2bcd(yrs); in m48t35_set_time()
128 writeb(yrs, &priv->reg->year); in m48t35_set_time()
Drtc-ds1286.c226 unsigned int yrs; in ds1286_set_time() local
229 yrs = tm->tm_year + 1900; in ds1286_set_time()
236 if (yrs < 1970) in ds1286_set_time()
239 yrs -= 1940; in ds1286_set_time()
240 if (yrs > 255) /* They are unsigned */ in ds1286_set_time()
243 if (yrs >= 100) in ds1286_set_time()
244 yrs -= 100; in ds1286_set_time()
251 yrs = bin2bcd(yrs); in ds1286_set_time()
257 ds1286_rtc_write(priv, yrs, RTC_YEAR); in ds1286_set_time()
Drtc-bq4802.c96 u8 sec, min, hrs, day, mon, yrs, century, val; in bq4802_set_time() local
102 yrs = year % 100; in bq4802_set_time()
115 yrs = bin2bcd(yrs); in bq4802_set_time()
128 p->write(p, 0x0a, yrs); in bq4802_set_time()
Drtc-mrst.c116 unsigned int yrs; in mrst_set_time() local
118 yrs = time->tm_year; in mrst_set_time()
125 if (yrs < 72 || yrs > 138) in mrst_set_time()
127 yrs -= 72; in mrst_set_time()
131 vrtc_cmos_write(yrs, RTC_YEAR); in mrst_set_time()
Drtc-ds1511.c188 u8 mon, day, dow, hrs, min, sec, yrs, cen; in ds1511_rtc_set_time() local
201 yrs = rtc_tm->tm_year % 100; in ds1511_rtc_set_time()
230 yrs = bin2bcd(yrs) & 0xff; in ds1511_rtc_set_time()
236 rtc_write(yrs, RTC_YEAR); in ds1511_rtc_set_time()
/linux-3.4.99/drivers/input/misc/
Dhp_sdc_rtc.c607 unsigned int yrs; in hp_sdc_rtc_ioctl()
615 yrs = hp_sdc_rtc_tm.tm_year + 1900; in hp_sdc_rtc_ioctl()
622 if (yrs < 1970) in hp_sdc_rtc_ioctl()
625 leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400)); in hp_sdc_rtc_ioctl()
634 if ((yrs -= eH) > 255) /* They are unsigned */ in hp_sdc_rtc_ioctl()