Lines Matching defs:alm
255 static int omap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
260 alm->time.tm_sec = rtc_read(OMAP_RTC_ALARM_SECONDS_REG);
261 alm->time.tm_min = rtc_read(OMAP_RTC_ALARM_MINUTES_REG);
262 alm->time.tm_hour = rtc_read(OMAP_RTC_ALARM_HOURS_REG);
263 alm->time.tm_mday = rtc_read(OMAP_RTC_ALARM_DAYS_REG);
264 alm->time.tm_mon = rtc_read(OMAP_RTC_ALARM_MONTHS_REG);
265 alm->time.tm_year = rtc_read(OMAP_RTC_ALARM_YEARS_REG);
269 bcd2tm(&alm->time);
270 alm->enabled = !!(rtc_read(OMAP_RTC_INTERRUPTS_REG)
276 static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
280 if (tm2bcd(&alm->time) < 0)
286 rtc_write(alm->time.tm_year, OMAP_RTC_ALARM_YEARS_REG);
287 rtc_write(alm->time.tm_mon, OMAP_RTC_ALARM_MONTHS_REG);
288 rtc_write(alm->time.tm_mday, OMAP_RTC_ALARM_DAYS_REG);
289 rtc_write(alm->time.tm_hour, OMAP_RTC_ALARM_HOURS_REG);
290 rtc_write(alm->time.tm_min, OMAP_RTC_ALARM_MINUTES_REG);
291 rtc_write(alm->time.tm_sec, OMAP_RTC_ALARM_SECONDS_REG);
294 if (alm->enabled)