Lines Matching refs:time
93 u16 time[4]; in wm8350_rtc_settime() local
97 time[0] = tm->tm_sec; in wm8350_rtc_settime()
98 time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT; in wm8350_rtc_settime()
99 time[1] = tm->tm_hour; in wm8350_rtc_settime()
100 time[1] |= (tm->tm_wday + 1) << WM8350_RTC_DAY_SHIFT; in wm8350_rtc_settime()
101 time[2] = tm->tm_mday; in wm8350_rtc_settime()
102 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT; in wm8350_rtc_settime()
103 time[3] = ((tm->tm_year + 1900) / 100) << WM8350_RTC_YHUNDREDS_SHIFT; in wm8350_rtc_settime()
104 time[3] |= (tm->tm_year + 1900) % 100; in wm8350_rtc_settime()
107 time[0], time[1], time[2], time[3]); in wm8350_rtc_settime()
126 ret = wm8350_block_write(wm8350, WM8350_RTC_SECONDS_MINUTES, 4, time); in wm8350_rtc_settime()
142 struct rtc_time *tm = &alrm->time; in wm8350_rtc_readalarm()
143 u16 time[4]; in wm8350_rtc_readalarm() local
146 ret = wm8350_block_read(wm8350, WM8350_ALARM_SECONDS_MINUTES, 4, time); in wm8350_rtc_readalarm()
150 tm->tm_sec = time[0] & WM8350_RTC_ALMSECS_MASK; in wm8350_rtc_readalarm()
154 tm->tm_min = time[0] & WM8350_RTC_ALMMINS_MASK; in wm8350_rtc_readalarm()
160 tm->tm_hour = time[1] & WM8350_RTC_ALMHRS_MASK; in wm8350_rtc_readalarm()
164 tm->tm_wday = ((time[1] >> WM8350_RTC_ALMDAY_SHIFT) & 0x7) - 1; in wm8350_rtc_readalarm()
168 tm->tm_mon = time[2] & WM8350_RTC_ALMMTH_MASK; in wm8350_rtc_readalarm()
174 tm->tm_mday = (time[2] & WM8350_RTC_ALMDATE_MASK); in wm8350_rtc_readalarm()
180 alrm->enabled = !(time[3] & WM8350_RTC_ALMSTS); in wm8350_rtc_readalarm()
246 struct rtc_time *tm = &alrm->time; in wm8350_rtc_setalarm()
247 u16 time[3]; in wm8350_rtc_setalarm() local
250 memset(time, 0, sizeof(time)); in wm8350_rtc_setalarm()
253 time[0] |= tm->tm_sec; in wm8350_rtc_setalarm()
255 time[0] |= WM8350_RTC_ALMSECS_MASK; in wm8350_rtc_setalarm()
258 time[0] |= tm->tm_min << WM8350_RTC_ALMMINS_SHIFT; in wm8350_rtc_setalarm()
260 time[0] |= WM8350_RTC_ALMMINS_MASK; in wm8350_rtc_setalarm()
263 time[1] |= tm->tm_hour; in wm8350_rtc_setalarm()
265 time[1] |= WM8350_RTC_ALMHRS_MASK; in wm8350_rtc_setalarm()
268 time[1] |= (tm->tm_wday + 1) << WM8350_RTC_ALMDAY_SHIFT; in wm8350_rtc_setalarm()
270 time[1] |= WM8350_RTC_ALMDAY_MASK; in wm8350_rtc_setalarm()
273 time[2] |= tm->tm_mday; in wm8350_rtc_setalarm()
275 time[2] |= WM8350_RTC_ALMDATE_MASK; in wm8350_rtc_setalarm()
278 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_ALMMTH_SHIFT; in wm8350_rtc_setalarm()
280 time[2] |= WM8350_RTC_ALMMTH_MASK; in wm8350_rtc_setalarm()
288 3, time); in wm8350_rtc_setalarm()