Lines Matching refs:alm
264 static int spear_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_read_alarm() argument
273 alm->time.tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_alarm()
274 alm->time.tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_alarm()
275 alm->time.tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_alarm()
276 alm->time.tm_mday = (date >> MDAY_SHIFT) & DAY_MASK; in spear_rtc_read_alarm()
277 alm->time.tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_alarm()
278 alm->time.tm_year = (date >> YEAR_SHIFT) & YEAR_MASK; in spear_rtc_read_alarm()
280 bcd2tm(&alm->time); in spear_rtc_read_alarm()
281 alm->enabled = readl(config->ioaddr + CTRL_REG) & INT_ENABLE; in spear_rtc_read_alarm()
294 static int spear_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_set_alarm() argument
299 if (tm2bcd(&alm->time) < 0) in spear_rtc_set_alarm()
304 time = (alm->time.tm_sec << SECOND_SHIFT) | (alm->time.tm_min << in spear_rtc_set_alarm()
305 MINUTE_SHIFT) | (alm->time.tm_hour << HOUR_SHIFT); in spear_rtc_set_alarm()
306 date = (alm->time.tm_mday << MDAY_SHIFT) | (alm->time.tm_mon << in spear_rtc_set_alarm()
307 MONTH_SHIFT) | (alm->time.tm_year << YEAR_SHIFT); in spear_rtc_set_alarm()
315 if (alm->enabled) in spear_rtc_set_alarm()