Home
last modified time | relevance | path

Searched refs:rtc_tm (Results 1 – 15 of 15) sorted by relevance

/linux-6.3-rc2/drivers/rtc/
A Drtc-ds1511.c194 min = rtc_tm->tm_min; in ds1511_rtc_set_time()
195 sec = rtc_tm->tm_sec; in ds1511_rtc_set_time()
200 if (day > rtc_month_days(rtc_tm->tm_mon, rtc_tm->tm_year)) in ds1511_rtc_set_time()
253 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in ds1511_rtc_read_time()
254 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in ds1511_rtc_read_time()
255 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in ds1511_rtc_read_time()
256 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); in ds1511_rtc_read_time()
257 rtc_tm->tm_wday = bcd2bin(rtc_tm->tm_wday); in ds1511_rtc_read_time()
258 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); in ds1511_rtc_read_time()
259 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); in ds1511_rtc_read_time()
[all …]
A Drtc-da9052.c83 rtc_tm->tm_sec = 0; in da9052_read_alarm()
85 ret = rtc_valid_tm(rtc_tm); in da9052_read_alarm()
106 alm_time = rtc_tm_to_time64(rtc_tm); in da9052_set_alarm()
108 if (rtc_tm->tm_sec > 0) { in da9052_set_alarm()
109 alm_time += 60 - rtc_tm->tm_sec; in da9052_set_alarm()
114 rtc_tm->tm_year -= 100; in da9052_set_alarm()
115 rtc_tm->tm_mon += 1; in da9052_set_alarm()
118 DA9052_RTC_MIN, rtc_tm->tm_min); in da9052_set_alarm()
124 v[0] = rtc_tm->tm_hour; in da9052_set_alarm()
125 v[1] = rtc_tm->tm_mday; in da9052_set_alarm()
[all …]
A Drtc-da9055.c72 rtc_tm->tm_sec = 0; in da9055_read_alarm()
74 return rtc_valid_tm(rtc_tm); in da9055_read_alarm()
82 rtc_tm->tm_year -= 100; in da9055_set_alarm()
83 rtc_tm->tm_mon += 1; in da9055_set_alarm()
86 DA9055_RTC_ALM_MIN, rtc_tm->tm_min); in da9055_set_alarm()
92 v[0] = rtc_tm->tm_hour; in da9055_set_alarm()
93 v[1] = rtc_tm->tm_mday; in da9055_set_alarm()
100 DA9055_RTC_ALM_MONTH, rtc_tm->tm_mon); in da9055_set_alarm()
151 rtc_tm->tm_mday = v[3] & DA9055_RTC_DAY; in da9055_rtc_read_time()
153 rtc_tm->tm_min = v[1] & DA9055_RTC_MIN; in da9055_rtc_read_time()
[all …]
A Drtc-pic32.c142 rtc_tm->tm_min = readb(base + PIC32_RTCMIN); in pic32_rtc_gettime()
143 rtc_tm->tm_mon = readb(base + PIC32_RTCMON); in pic32_rtc_gettime()
154 } while (rtc_tm->tm_sec == 0 && tries < 2); in pic32_rtc_gettime()
156 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in pic32_rtc_gettime()
157 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in pic32_rtc_gettime()
158 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in pic32_rtc_gettime()
159 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); in pic32_rtc_gettime()
160 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon) - 1; in pic32_rtc_gettime()
161 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); in pic32_rtc_gettime()
163 rtc_tm->tm_year += 100; in pic32_rtc_gettime()
[all …]
A Drtc-sunxi.c234 rtc_tm->tm_sec = SUNXI_TIME_GET_SEC_VALUE(time); in sunxi_rtc_gettime()
235 rtc_tm->tm_min = SUNXI_TIME_GET_MIN_VALUE(time); in sunxi_rtc_gettime()
238 rtc_tm->tm_mday = SUNXI_DATE_GET_DAY_VALUE(date); in sunxi_rtc_gettime()
239 rtc_tm->tm_mon = SUNXI_DATE_GET_MON_VALUE(date); in sunxi_rtc_gettime()
243 rtc_tm->tm_mon -= 1; in sunxi_rtc_gettime()
341 year = rtc_tm->tm_year + 1900; in sunxi_rtc_settime()
349 rtc_tm->tm_mon += 1; in sunxi_rtc_settime()
352 SUNXI_DATE_SET_MON_VALUE(rtc_tm->tm_mon) | in sunxi_rtc_settime()
353 SUNXI_DATE_SET_YEAR_VALUE(rtc_tm->tm_year, in sunxi_rtc_settime()
360 SUNXI_TIME_SET_MIN_VALUE(rtc_tm->tm_min) | in sunxi_rtc_settime()
[all …]
A Drtc-sun6i.c482 rtc_tm->tm_mday = SUN6I_DATE_GET_DAY_VALUE(date); in sun6i_rtc_gettime()
490 rtc_tm->tm_year += SUN6I_YEAR_OFF; in sun6i_rtc_gettime()
493 rtc_tm->tm_sec = SUN6I_TIME_GET_SEC_VALUE(time); in sun6i_rtc_gettime()
494 rtc_tm->tm_min = SUN6I_TIME_GET_MIN_VALUE(time); in sun6i_rtc_gettime()
495 rtc_tm->tm_hour = SUN6I_TIME_GET_HOUR_VALUE(time); in sun6i_rtc_gettime()
604 SUN6I_TIME_SET_MIN_VALUE(rtc_tm->tm_min) | in sun6i_rtc_settime()
605 SUN6I_TIME_SET_HOUR_VALUE(rtc_tm->tm_hour); in sun6i_rtc_settime()
611 rtc_tm->tm_year -= SUN6I_YEAR_OFF; in sun6i_rtc_settime()
612 rtc_tm->tm_mon += 1; in sun6i_rtc_settime()
615 SUN6I_DATE_SET_MON_VALUE(rtc_tm->tm_mon) | in sun6i_rtc_settime()
[all …]
A Drtc-ac100.c395 rtc_tm->tm_sec = bcd2bin(reg[0] & AC100_RTC_SEC_MASK); in ac100_rtc_get_time()
396 rtc_tm->tm_min = bcd2bin(reg[1] & AC100_RTC_MIN_MASK); in ac100_rtc_get_time()
397 rtc_tm->tm_hour = bcd2bin(reg[2] & AC100_RTC_HOU_MASK); in ac100_rtc_get_time()
398 rtc_tm->tm_wday = bcd2bin(reg[3] & AC100_RTC_WEE_MASK); in ac100_rtc_get_time()
399 rtc_tm->tm_mday = bcd2bin(reg[4] & AC100_RTC_DAY_MASK); in ac100_rtc_get_time()
401 rtc_tm->tm_year = bcd2bin(reg[6] & AC100_RTC_YEA_MASK) + in ac100_rtc_get_time()
415 year = rtc_tm->tm_year - AC100_YEAR_OFF; in ac100_rtc_set_time()
423 reg[0] = bin2bcd(rtc_tm->tm_sec) & AC100_RTC_SEC_MASK; in ac100_rtc_set_time()
424 reg[1] = bin2bcd(rtc_tm->tm_min) & AC100_RTC_MIN_MASK; in ac100_rtc_set_time()
425 reg[2] = bin2bcd(rtc_tm->tm_hour) & AC100_RTC_HOU_MASK; in ac100_rtc_set_time()
[all …]
A Drtc-ab-b5ze-s3.c327 rtc_secs = rtc_tm_to_time64(&rtc_tm); in _abb5zes3_rtc_read_timer()
383 alarm_tm->tm_year = rtc_tm.tm_year; in _abb5zes3_rtc_read_alarm()
384 alarm_tm->tm_mon = rtc_tm.tm_mon; in _abb5zes3_rtc_read_alarm()
386 rtc_secs = rtc_tm_to_time64(&rtc_tm); in _abb5zes3_rtc_read_alarm()
442 struct rtc_time rtc_tm; in _abb5zes3_rtc_set_alarm() local
461 rtc_tm.tm_mon = 0; in _abb5zes3_rtc_set_alarm()
462 rtc_tm.tm_year += 1; in _abb5zes3_rtc_set_alarm()
464 rtc_tm.tm_mon += 1; in _abb5zes3_rtc_set_alarm()
467 rtc_secs = rtc_tm_to_time64(&rtc_tm); in _abb5zes3_rtc_set_alarm()
546 struct rtc_time rtc_tm; in abb5zes3_rtc_set_alarm() local
[all …]
A Drtc-stmp3xxx.c148 static int stmp3xxx_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) in stmp3xxx_rtc_gettime() argument
157 rtc_time64_to_tm(readl(rtc_data->io + STMP3XXX_RTC_SECONDS), rtc_tm); in stmp3xxx_rtc_gettime()
161 static int stmp3xxx_rtc_settime(struct device *dev, struct rtc_time *rtc_tm) in stmp3xxx_rtc_settime() argument
165 writel(rtc_tm_to_time64(rtc_tm), rtc_data->io + STMP3XXX_RTC_SECONDS); in stmp3xxx_rtc_settime()
A Drtc-s3c.c211 struct rtc_time rtc_tm = *tm; in s3c_rtc_settime() local
219 rtc_tm.tm_year -= 100; in s3c_rtc_settime()
220 rtc_tm.tm_mon += 1; in s3c_rtc_settime()
222 return s3c_rtc_write_time(info, &rtc_tm); in s3c_rtc_settime()
A Drtc-isl1208.c399 struct rtc_time rtc_tm; in isl1208_i2c_set_alarm() local
402 err = isl1208_i2c_read_time(client, &rtc_tm); in isl1208_i2c_set_alarm()
407 if (!alarm->enabled || rtc_tm_sub(alarm_tm, &rtc_tm) <= 0) in isl1208_i2c_set_alarm()
/linux-6.3-rc2/arch/powerpc/kernel/
A Drtas-rtc.c47 void rtas_get_rtc_time(struct rtc_time *rtc_tm) in rtas_get_rtc_time() argument
61 memset(rtc_tm, 0, sizeof(struct rtc_time)); in rtas_get_rtc_time()
78 rtc_tm->tm_sec = ret[5]; in rtas_get_rtc_time()
79 rtc_tm->tm_min = ret[4]; in rtas_get_rtc_time()
80 rtc_tm->tm_hour = ret[3]; in rtas_get_rtc_time()
81 rtc_tm->tm_mday = ret[2]; in rtas_get_rtc_time()
82 rtc_tm->tm_mon = ret[1] - 1; in rtas_get_rtc_time()
83 rtc_tm->tm_year = ret[0] - 1900; in rtas_get_rtc_time()
/linux-6.3-rc2/arch/m68k/bvme6000/
A Drtc.c73 struct rtc_time rtc_tm; in rtc_ioctl() local
80 if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) in rtc_ioctl()
83 yrs = rtc_tm.tm_year; in rtc_ioctl()
86 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_ioctl()
87 day = rtc_tm.tm_mday; in rtc_ioctl()
88 hrs = rtc_tm.tm_hour; in rtc_ioctl()
89 min = rtc_tm.tm_min; in rtc_ioctl()
90 sec = rtc_tm.tm_sec; in rtc_ioctl()
119 if (rtc_tm.tm_wday >= 0) in rtc_ioctl()
120 rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1); in rtc_ioctl()
/linux-6.3-rc2/arch/m68k/mvme16x/
A Drtc.c68 struct rtc_time rtc_tm; in rtc_ioctl() local
75 if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) in rtc_ioctl()
78 yrs = rtc_tm.tm_year; in rtc_ioctl()
81 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_ioctl()
82 day = rtc_tm.tm_mday; in rtc_ioctl()
83 hrs = rtc_tm.tm_hour; in rtc_ioctl()
84 min = rtc_tm.tm_min; in rtc_ioctl()
85 sec = rtc_tm.tm_sec; in rtc_ioctl()
/linux-6.3-rc2/tools/testing/selftests/rtc/
A Drtctest.c42 struct rtc_time rtc_tm; in TEST_F() local
49 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F()
53 rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900, in TEST_F()
54 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); in TEST_F()
88 struct rtc_time rtc_tm; variable
98 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm);
100 start_rtc_read = rtc_time_to_timestamp(&rtc_tm);
106 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm);
109 rtc_read = rtc_time_to_timestamp(&rtc_tm);

Completed in 33 milliseconds