Lines Matching refs:alm
270 static int ds1305_get_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_get_alarm() argument
289 alm->enabled = !!(ds1305->ctrl[0] & DS1305_AEI0); in ds1305_get_alarm()
290 alm->pending = !!(ds1305->ctrl[1] & DS1305_AEI0); in ds1305_get_alarm()
312 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_alarm()
313 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_alarm()
314 alm->time.tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_alarm()
322 static int ds1305_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_set_alarm() argument
332 status = rtc_tm_to_time(&alm->time, &later); in ds1305_set_alarm()
363 buf[1 + DS1305_SEC] = bin2bcd(alm->time.tm_sec); in ds1305_set_alarm()
364 buf[1 + DS1305_MIN] = bin2bcd(alm->time.tm_min); in ds1305_set_alarm()
365 buf[1 + DS1305_HOUR] = hour2bcd(ds1305->hr12, alm->time.tm_hour); in ds1305_set_alarm()
377 if (alm->enabled) { in ds1305_set_alarm()