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