Lines Matching full:time
34 * readout is unspecified. The maximum update time is ~2ms. Poll in mc146818_avoid_UIP()
81 pr_warn("Reading current time from RTC took around %li ms\n", in mc146818_avoid_UIP()
101 struct rtc_time *time; member
121 p->time->tm_sec = seconds; in mc146818_get_time_callback()
122 p->time->tm_min = CMOS_READ(RTC_MINUTES); in mc146818_get_time_callback()
123 p->time->tm_hour = CMOS_READ(RTC_HOURS); in mc146818_get_time_callback()
124 p->time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_time_callback()
125 p->time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time_callback()
126 p->time->tm_year = CMOS_READ(RTC_YEAR); in mc146818_get_time_callback()
143 * mc146818_get_time - Get the current time from the RTC
144 * @time: pointer to struct rtc_time to store the current time
147 * This function reads the current time from the RTC and stores it in the
149 * time to wait for the RTC to become ready.
154 int mc146818_get_time(struct rtc_time *time, int timeout) in mc146818_get_time() argument
157 .time = time in mc146818_get_time()
161 memset(time, 0, sizeof(*time)); in mc146818_get_time()
167 time->tm_sec = bcd2bin(time->tm_sec); in mc146818_get_time()
168 time->tm_min = bcd2bin(time->tm_min); in mc146818_get_time()
169 time->tm_hour = bcd2bin(time->tm_hour); in mc146818_get_time()
170 time->tm_mday = bcd2bin(time->tm_mday); in mc146818_get_time()
171 time->tm_mon = bcd2bin(time->tm_mon); in mc146818_get_time()
172 time->tm_year = bcd2bin(time->tm_year); in mc146818_get_time()
179 time->tm_year += p.real_year - 72; in mc146818_get_time()
184 time->tm_year += (p.century - 19) * 100; in mc146818_get_time()
191 if (time->tm_year <= 69) in mc146818_get_time()
192 time->tm_year += 100; in mc146818_get_time()
194 time->tm_mon--; in mc146818_get_time()
211 /* Set the current date and time in the real time clock. */
212 int mc146818_set_time(struct rtc_time *time) in mc146818_set_time() argument
223 yrs = time->tm_year; in mc146818_set_time()
224 mon = time->tm_mon + 1; /* tm_mon starts at zero */ in mc146818_set_time()
225 day = time->tm_mday; in mc146818_set_time()
226 hrs = time->tm_hour; in mc146818_set_time()
227 min = time->tm_min; in mc146818_set_time()
228 sec = time->tm_sec; in mc146818_set_time()