Lines Matching refs:time
34 * readout is unspecified. The maximum update time is ~2ms. Poll
81 pr_warn("Reading current time from RTC took around %li ms\n",
101 struct rtc_time *time;
121 p->time->tm_sec = seconds;
122 p->time->tm_min = CMOS_READ(RTC_MINUTES);
123 p->time->tm_hour = CMOS_READ(RTC_HOURS);
124 p->time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);
125 p->time->tm_mon = CMOS_READ(RTC_MONTH);
126 p->time->tm_year = CMOS_READ(RTC_YEAR);
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)
157 .time = time
161 memset(time, 0, sizeof(*time));
167 time->tm_sec = bcd2bin(time->tm_sec);
168 time->tm_min = bcd2bin(time->tm_min);
169 time->tm_hour = bcd2bin(time->tm_hour);
170 time->tm_mday = bcd2bin(time->tm_mday);
171 time->tm_mon = bcd2bin(time->tm_mon);
172 time->tm_year = bcd2bin(time->tm_year);
179 time->tm_year += p.real_year - 72;
184 time->tm_year += (p.century - 19) * 100;
191 if (time->tm_year <= 69)
192 time->tm_year += 100;
194 time->tm_mon--;
211 /* Set the current date and time in the real time clock. */
212 int mc146818_set_time(struct rtc_time *time)
223 yrs = time->tm_year;
224 mon = time->tm_mon + 1; /* tm_mon starts at zero */
225 day = time->tm_mday;
226 hrs = time->tm_hour;
227 min = time->tm_min;
228 sec = time->tm_sec;