Home
last modified time | relevance | path

Searched refs:tm_year (Results 1 – 25 of 181) sorted by relevance

12345678

/linux-6.1.9/drivers/rtc/
Drtc-max6902.c72 dt->tm_year = bcd2bin(buf[6]); in max6902_read_time()
81 dt->tm_year += century; in max6902_read_time()
82 dt->tm_year -= 1900; in max6902_read_time()
89 dt->tm_year = dt->tm_year + 1900; in max6902_set_time()
101 max6902_set_reg(dev, MAX6902_REG_YEAR, bin2bcd(dt->tm_year % 100)); in max6902_set_time()
102 max6902_set_reg(dev, MAX6902_REG_CENTURY, bin2bcd(dt->tm_year / 100)); in max6902_set_time()
Drtc-mc146818-lib.c117 p->time->tm_year = CMOS_READ(RTC_YEAR); in mc146818_get_time_callback()
151 time->tm_year = bcd2bin(time->tm_year); in mc146818_get_time()
158 time->tm_year += p.real_year - 72; in mc146818_get_time()
163 time->tm_year += (p.century - 19) * 100; in mc146818_get_time()
170 if (time->tm_year <= 69) in mc146818_get_time()
171 time->tm_year += 100; in mc146818_get_time()
202 yrs = time->tm_year; in mc146818_set_time()
Drtc-m41t94.c38 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_set_time()
49 if (tm->tm_year >= 100) in m41t94_set_time()
51 buf[M41T94_REG_YEAR] = bin2bcd(tm->tm_year % 100); in m41t94_set_time()
89 tm->tm_year = bcd2bin(spi_w8r8(spi, M41T94_REG_YEAR)); in m41t94_read_time()
91 tm->tm_year += 100; in m41t94_read_time()
97 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_read_time()
Drtc-ds1511.c182 if (rtc_tm->tm_year < 1900) in ds1511_rtc_set_time()
183 rtc_tm->tm_year += 1900; in ds1511_rtc_set_time()
185 if (rtc_tm->tm_year < 1970) in ds1511_rtc_set_time()
188 yrs = rtc_tm->tm_year % 100; in ds1511_rtc_set_time()
189 cen = rtc_tm->tm_year / 100; in ds1511_rtc_set_time()
200 if (day > rtc_month_days(rtc_tm->tm_mon, rtc_tm->tm_year)) in ds1511_rtc_set_time()
247 rtc_tm->tm_year = rtc_read(RTC_YEAR) & 0x7f; in ds1511_rtc_read_time()
259 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); in ds1511_rtc_read_time()
266 century += rtc_tm->tm_year; in ds1511_rtc_read_time()
267 rtc_tm->tm_year = century - 1900; in ds1511_rtc_read_time()
Drtc-da9052.c78 rtc_tm->tm_year = (v[0][4] & DA9052_RTC_YEAR) + 100; in da9052_read_alarm()
114 rtc_tm->tm_year -= 100; in da9052_set_alarm()
133 DA9052_RTC_YEAR, rtc_tm->tm_year); in da9052_set_alarm()
176 rtc_tm->tm_year = (v[0][5] & DA9052_RTC_YEAR) + 100; in da9052_rtc_read_time()
203 if ((tm->tm_year < 100) || (tm->tm_year > 163)) in da9052_rtc_set_time()
213 v[5] = tm->tm_year - 100; in da9052_rtc_set_time()
244 if ((tm->tm_year < 100) || (tm->tm_year > 163)) in da9052_rtc_set_alarm()
Drtc-moxart.c147 (((tm->tm_year - 100) / 10) << 4) | in moxart_rtc_set_time()
148 ((tm->tm_year - 100) % 10)); in moxart_rtc_set_time()
176 __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, in moxart_rtc_set_time()
215 tm->tm_year = (((v & 0xF0) >> 4) * 10) + (v & 0x0F); in moxart_rtc_read_time()
216 tm->tm_year += 100; in moxart_rtc_read_time()
217 if (tm->tm_year <= 69) in moxart_rtc_read_time()
218 tm->tm_year += 100; in moxart_rtc_read_time()
225 if (!(tm->tm_year % 4) && (tm->tm_year % 100)) in moxart_rtc_read_time()
Drtc-m48t35.c74 tm->tm_year = readb(&priv->reg->year); in m48t35_read_time()
83 tm->tm_year = bcd2bin(tm->tm_year); in m48t35_read_time()
89 tm->tm_year += 70; in m48t35_read_time()
90 if (tm->tm_year <= 69) in m48t35_read_time()
91 tm->tm_year += 100; in m48t35_read_time()
104 yrs = tm->tm_year + 1900; in m48t35_set_time()
Drtc-msm6242.c132 tm->tm_year = msm6242_read(priv, MSM6242_YEAR10) * 10 + in msm6242_read_time()
134 if (tm->tm_year <= 69) in msm6242_read_time()
135 tm->tm_year += 100; in msm6242_read_time()
175 if (tm->tm_year >= 100) in msm6242_set_time()
176 tm->tm_year -= 100; in msm6242_set_time()
177 msm6242_write(priv, tm->tm_year / 10, MSM6242_YEAR10); in msm6242_set_time()
178 msm6242_write(priv, tm->tm_year % 10, MSM6242_YEAR1); in msm6242_set_time()
Drtc-ds1286.c186 tm->tm_year = ds1286_rtc_read(priv, RTC_YEAR); in ds1286_read_time()
196 tm->tm_year = bcd2bin(tm->tm_year); in ds1286_read_time()
202 if (tm->tm_year < 45) in ds1286_read_time()
203 tm->tm_year += 30; in ds1286_read_time()
204 tm->tm_year += 40; in ds1286_read_time()
205 if (tm->tm_year < 70) in ds1286_read_time()
206 tm->tm_year += 100; in ds1286_read_time()
221 yrs = tm->tm_year + 1900; in ds1286_set_time()
Dlib.c130 tm->tm_year = (int) (year - 1900); in rtc_time64_to_tm()
149 if (tm->tm_year < 70 || in rtc_valid_tm()
150 tm->tm_year > (INT_MAX - 1900) || in rtc_valid_tm()
154 ((unsigned int)tm->tm_year + 1900)) || in rtc_valid_tm()
170 return mktime64(((unsigned int)tm->tm_year + 1900), tm->tm_mon + 1, in rtc_tm_to_time64()
Drtc-m41t93.c56 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t93_set_time()
58 if (tm->tm_year < 100) { in m41t93_set_time()
91 ((tm->tm_year/100-1) << 6); in m41t93_set_time()
95 data[M41T93_REG_YEAR] = bin2bcd(tm->tm_year % 100); in m41t93_set_time()
151 tm->tm_year = bcd2bin(buf[M41T93_REG_YEAR]) + century_after_1900 * 100; in m41t93_get_time()
157 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t93_get_time()
Drtc-rp5c01.c111 tm->tm_year = rp5c01_read(priv, RP5C01_10_YEAR) * 10 + in rp5c01_read_time()
113 if (tm->tm_year <= 69) in rp5c01_read_time()
114 tm->tm_year += 100; in rp5c01_read_time()
141 if (tm->tm_year >= 100) in rp5c01_set_time()
142 tm->tm_year -= 100; in rp5c01_set_time()
143 rp5c01_write(priv, tm->tm_year / 10, RP5C01_10_YEAR); in rp5c01_set_time()
144 rp5c01_write(priv, tm->tm_year % 10, RP5C01_1_YEAR); in rp5c01_set_time()
Drtc-max6916.c72 dt->tm_year = bcd2bin(buf[6]) + 100; in max6916_read_time()
82 if (dt->tm_year < 100 || dt->tm_year > 199) { in max6916_set_time()
84 dt->tm_year + 1900); in max6916_set_time()
95 buf[7] = bin2bcd(dt->tm_year % 100); in max6916_set_time()
Drtc-rx4581.c156 tm->tm_year = bcd2bin(date[RX4581_REG_YR]); in rx4581_get_datetime()
157 if (tm->tm_year < 70) in rx4581_get_datetime()
158 tm->tm_year += 100; /* assume we are in 1970...2069 */ in rx4581_get_datetime()
165 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rx4581_get_datetime()
180 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rx4581_set_datetime()
194 buf[RX4581_REG_YR+1] = bin2bcd(tm->tm_year % 100); in rx4581_set_datetime()
Drtc-bq4802.c67 tm->tm_year = p->read(p, 0x0a); in bq4802_read_time()
80 tm->tm_year = bcd2bin(tm->tm_year); in bq4802_read_time()
84 tm->tm_year += (century * 100); in bq4802_read_time()
85 tm->tm_year -= 1900; in bq4802_read_time()
99 year = tm->tm_year + 1900; in bq4802_set_time()
Drtc-mt6397.c79 tm->tm_year = data[RTC_OFFSET_YEAR]; in __mtk_rtc_read_time()
103 tm->tm_year += RTC_MIN_YEAR_OFFSET; in mtk_rtc_read_time()
125 tm->tm_year -= RTC_MIN_YEAR_OFFSET; in mtk_rtc_set_time()
133 data[RTC_OFFSET_YEAR] = tm->tm_year; in mtk_rtc_set_time()
179 tm->tm_year = data[RTC_OFFSET_YEAR] & RTC_AL_YEA_MASK; in mtk_rtc_read_alarm()
181 tm->tm_year += RTC_MIN_YEAR_OFFSET; in mtk_rtc_read_alarm()
197 tm->tm_year -= RTC_MIN_YEAR_OFFSET; in mtk_rtc_set_alarm()
217 (tm->tm_year & RTC_AL_YEA_MASK)); in mtk_rtc_set_alarm()
Drtc-optee.c28 u32 tm_year; member
88 tm->tm_year = optee_tm->tm_year - 1900; in optee_rtc_readtime()
90 tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); in optee_rtc_readtime()
109 optee_tm.tm_year = tm->tm_year + 1900; in optee_rtc_settime()
224 rtc->range_min = mktime64(tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, in optee_rtc_read_info()
227 rtc->range_max = mktime64(tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, in optee_rtc_read_info()
/linux-6.1.9/arch/powerpc/platforms/maple/
Dtime.c59 tm->tm_year = maple_clock_read(RTC_YEAR); in maple_get_rtc_time()
69 tm->tm_year = bcd2bin(tm->tm_year); in maple_get_rtc_time()
71 if ((tm->tm_year + 1900) < 1970) in maple_get_rtc_time()
72 tm->tm_year += 100; in maple_get_rtc_time()
97 year = tm->tm_year; in maple_set_rtc_time()
/linux-6.1.9/tools/testing/selftests/rtc/
Dsetdate.c47 sscanf(date, "%d-%d-%d", &new.tm_mday, &new.tm_mon, &new.tm_year); in main()
49 new.tm_year -= 1900; in main()
53 new.tm_mday, new.tm_mon + 1, new.tm_year + 1900, in main()
72 current.tm_mday, current.tm_mon + 1, current.tm_year + 1900, in main()
/linux-6.1.9/arch/m68k/sun3/
Dintersil.c46 todintersil->year = (t->tm_year - 68) % 100; in sun3_hwclk()
56 t->tm_year = todintersil->year + 68; in sun3_hwclk()
58 if (t->tm_year < 70) in sun3_hwclk()
59 t->tm_year += 100; in sun3_hwclk()
/linux-6.1.9/arch/m68k/hp300/
Dconfig.c218 t->tm_year = hp300_rtc_read(RTC_REG_YEAR1) * 10 + in hp300_hwclk()
220 if (t->tm_year <= 69) in hp300_hwclk()
221 t->tm_year += 100; in hp300_hwclk()
234 if (t->tm_year >= 100) in hp300_hwclk()
235 t->tm_year -= 100; in hp300_hwclk()
236 hp300_rtc_write(RTC_REG_YEAR1, t->tm_year / 10); in hp300_hwclk()
237 hp300_rtc_write(RTC_REG_YEAR2, t->tm_year % 10); in hp300_hwclk()
/linux-6.1.9/arch/m68k/sun3x/
Dtime.c56 h->year = bin2bcd(t->tm_year % 100); in sun3x_hwclk()
66 t->tm_year = bcd2bin(h->year); in sun3x_hwclk()
68 if (t->tm_year < 70) in sun3x_hwclk()
69 t->tm_year += 100; in sun3x_hwclk()
/linux-6.1.9/arch/m68k/bvme6000/
Dconfig.c295 rtc->t0cr_rtmr = t->tm_year%4; in bvme6000_hwclk()
302 rtc->bcd_year = bin2bcd(t->tm_year%100); in bvme6000_hwclk()
305 rtc->t0cr_rtmr = t->tm_year%4 | 0x08; in bvme6000_hwclk()
315 t->tm_year = bcd2bin(rtc->bcd_year); in bvme6000_hwclk()
316 if (t->tm_year < 70) in bvme6000_hwclk()
317 t->tm_year += 100; in bvme6000_hwclk()
/linux-6.1.9/arch/m68k/mvme16x/
Drtc.c57 wtime.tm_year = bcd2bin(rtc->bcd_year); in rtc_ioctl()
58 if (wtime.tm_year < 70) in rtc_ioctl()
59 wtime.tm_year += 100; in rtc_ioctl()
78 yrs = rtc_tm.tm_year; in rtc_ioctl()
/linux-6.1.9/arch/powerpc/platforms/chrp/
Dtime.c107 tm.tm_year = bin2bcd(tm.tm_year); in chrp_set_rtc_time()
114 chrp_cmos_clock_write(tm.tm_year,RTC_YEAR); in chrp_set_rtc_time()
158 tm->tm_year = year; in chrp_get_rtc_time()

12345678