Lines Matching refs:alm
339 static int omap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_read_alarm() argument
347 alm->time.tm_sec = rtc_read(rtc, OMAP_RTC_ALARM_SECONDS_REG); in omap_rtc_read_alarm()
348 alm->time.tm_min = rtc_read(rtc, OMAP_RTC_ALARM_MINUTES_REG); in omap_rtc_read_alarm()
349 alm->time.tm_hour = rtc_read(rtc, OMAP_RTC_ALARM_HOURS_REG); in omap_rtc_read_alarm()
350 alm->time.tm_mday = rtc_read(rtc, OMAP_RTC_ALARM_DAYS_REG); in omap_rtc_read_alarm()
351 alm->time.tm_mon = rtc_read(rtc, OMAP_RTC_ALARM_MONTHS_REG); in omap_rtc_read_alarm()
352 alm->time.tm_year = rtc_read(rtc, OMAP_RTC_ALARM_YEARS_REG); in omap_rtc_read_alarm()
356 bcd2tm(&alm->time); in omap_rtc_read_alarm()
359 alm->enabled = !!(interrupts & OMAP_RTC_INTERRUPTS_IT_ALARM); in omap_rtc_read_alarm()
364 static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_set_alarm() argument
369 tm2bcd(&alm->time); in omap_rtc_set_alarm()
375 rtc_write(rtc, OMAP_RTC_ALARM_YEARS_REG, alm->time.tm_year); in omap_rtc_set_alarm()
376 rtc_write(rtc, OMAP_RTC_ALARM_MONTHS_REG, alm->time.tm_mon); in omap_rtc_set_alarm()
377 rtc_write(rtc, OMAP_RTC_ALARM_DAYS_REG, alm->time.tm_mday); in omap_rtc_set_alarm()
378 rtc_write(rtc, OMAP_RTC_ALARM_HOURS_REG, alm->time.tm_hour); in omap_rtc_set_alarm()
379 rtc_write(rtc, OMAP_RTC_ALARM_MINUTES_REG, alm->time.tm_min); in omap_rtc_set_alarm()
380 rtc_write(rtc, OMAP_RTC_ALARM_SECONDS_REG, alm->time.tm_sec); in omap_rtc_set_alarm()
386 if (alm->enabled) { in omap_rtc_set_alarm()