Lines Matching +full:start +full:- +full:year
1 /* SPDX-License-Identifier: GPL-2.0+ */
13 /* bcd<->bin functions are needed by almost all the RTC drivers, let's include
23 * get() - get the current time
34 * set() - set the current time
45 * reset() - reset the RTC to a known-good state
47 * This function resets the RTC to a known-good state. The time may
52 * @return 0 if OK, -ve on error
57 * read8() - Read an 8-bit register
61 * @return value read, or -ve on error
66 * write8() - Write an 8-bit register
71 * @return 0 if OK, -ve on error
77 #define rtc_get_ops(dev) ((struct rtc_ops *)(dev)->driver->ops)
80 * dm_rtc_get() - Read the time from an RTC
84 * @return 0 if OK, -ve on error
89 * dm_rtc_set() - Write a time to an RTC
93 * @return 0 if OK, -ve on error
98 * dm_rtc_reset() - reset the RTC to a known-good state
106 * @return 0 if OK, -ve on error
111 * rtc_read8() - Read an 8-bit register
115 * @return value read, or -ve on error
120 * rtc_write8() - Write an 8-bit register
125 * @return 0 if OK, -ve on error
130 * rtc_read16() - Read a 16-bit value from the RTC
133 * @reg: Offset to start reading from
135 * @return 0 if OK, -ve on error
140 * rtc_write16() - Write a 16-bit value to the RTC
143 * @reg: Register to start writing to
145 * @return 0 if OK, -ve on error
150 * rtc_read32() - Read a 32-bit value from the RTC
153 * @reg: Offset to start reading from
155 * @return 0 if OK, -ve on error
160 * rtc_write32() - Write a 32-bit value to the RTC
163 * @reg: Register to start writing to
165 * @return 0 if OK, -ve on error
176 * rtc_read8() - Read an 8-bit register
184 * rtc_write8() - Write an 8-bit register
192 * rtc_read32() - Read a 32-bit value from the RTC
194 * @reg: Offset to start reading from
200 * rtc_write32() - Write a 32-bit value to the RTC
202 * @reg: Register to start writing to
208 * rtc_init() - Set up the real time clock ready for use
214 * is_leap_year - Check if year is a leap year
216 * @year Year
217 * @return 1 if leap year
219 static inline bool is_leap_year(unsigned int year) in is_leap_year() argument
221 return (!(year % 4) && (year % 100)) || !(year % 400); in is_leap_year()
225 * rtc_calc_weekday() - Work out the weekday from a time
227 * This only works for the Gregorian calendar - i.e. after 1752 (in the UK).
228 * It sets time->tm_wdaay to the correct day of the week.
231 * @return 0 if OK, -EINVAL if the weekday could not be determined
236 * rtc_to_tm() - Convert a time_t value into a broken-out time
243 * @time_t: Number of seconds since 1970-01-01 00:00:00
244 * @time: Place to put the broken-out time
249 * rtc_mktime() - Convert a broken-out time into a time_t value
256 * @time: Broken-out time to convert
257 * @return corresponding time_t value, seconds since 1970-01-01 00:00:00