Lines Matching refs:alarm
208 static int abeoz9_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) in abeoz9_rtc_read_alarm() argument
224 alarm->enabled = val[0] & ABEOZ9_REG_CTRL_INT_AIE; in abeoz9_rtc_read_alarm()
225 alarm->pending = val[1] & ABEOZ9_REG_CTRL_INT_FLAG_AF; in abeoz9_rtc_read_alarm()
231 alarm->time.tm_sec = bcd2bin(FIELD_GET(ABEOZ9_BIT_ALARM_SEC, regs[0])); in abeoz9_rtc_read_alarm()
232 alarm->time.tm_min = bcd2bin(FIELD_GET(ABEOZ9_BIT_ALARM_MIN, regs[1])); in abeoz9_rtc_read_alarm()
233 alarm->time.tm_hour = bcd2bin(FIELD_GET(ABEOZ9_BIT_ALARM_HOURS, regs[2])); in abeoz9_rtc_read_alarm()
235 alarm->time.tm_hour += 12; in abeoz9_rtc_read_alarm()
237 alarm->time.tm_mday = bcd2bin(FIELD_GET(ABEOZ9_BIT_ALARM_DAYS, regs[3])); in abeoz9_rtc_read_alarm()
251 static int abeoz9_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) in abeoz9_rtc_set_alarm() argument
263 bin2bcd(alarm->time.tm_sec)); in abeoz9_rtc_set_alarm()
265 bin2bcd(alarm->time.tm_min)); in abeoz9_rtc_set_alarm()
267 bin2bcd(alarm->time.tm_hour)); in abeoz9_rtc_set_alarm()
269 bin2bcd(alarm->time.tm_mday)); in abeoz9_rtc_set_alarm()
276 return abeoz9_rtc_alarm_irq_enable(dev, alarm->enabled); in abeoz9_rtc_set_alarm()