Lines Matching refs:alm
256 static int spear_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_read_alarm() argument
265 alm->time.tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_alarm()
266 alm->time.tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_alarm()
267 alm->time.tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_alarm()
268 alm->time.tm_mday = (date >> MDAY_SHIFT) & DAY_MASK; in spear_rtc_read_alarm()
269 alm->time.tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_alarm()
270 alm->time.tm_year = (date >> YEAR_SHIFT) & YEAR_MASK; in spear_rtc_read_alarm()
272 bcd2tm(&alm->time); in spear_rtc_read_alarm()
273 alm->enabled = readl(config->ioaddr + CTRL_REG) & INT_ENABLE; in spear_rtc_read_alarm()
286 static int spear_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_set_alarm() argument
292 tm2bcd(&alm->time); in spear_rtc_set_alarm()
296 time = (alm->time.tm_sec << SECOND_SHIFT) | (alm->time.tm_min << in spear_rtc_set_alarm()
297 MINUTE_SHIFT) | (alm->time.tm_hour << HOUR_SHIFT); in spear_rtc_set_alarm()
298 date = (alm->time.tm_mday << MDAY_SHIFT) | (alm->time.tm_mon << in spear_rtc_set_alarm()
299 MONTH_SHIFT) | (alm->time.tm_year << YEAR_SHIFT); in spear_rtc_set_alarm()
307 if (alm->enabled) in spear_rtc_set_alarm()