Lines Matching refs:alm
275 static int ds1305_get_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_get_alarm() argument
294 alm->enabled = !!(ds1305->ctrl[0] & DS1305_AEI0); in ds1305_get_alarm()
295 alm->pending = !!(ds1305->ctrl[1] & DS1305_AEI0); in ds1305_get_alarm()
317 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_alarm()
318 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_alarm()
319 alm->time.tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_alarm()
320 alm->time.tm_mday = -1; in ds1305_get_alarm()
321 alm->time.tm_mon = -1; in ds1305_get_alarm()
322 alm->time.tm_year = -1; in ds1305_get_alarm()
324 alm->time.tm_wday = -1; in ds1305_get_alarm()
325 alm->time.tm_mday = -1; in ds1305_get_alarm()
326 alm->time.tm_isdst = -1; in ds1305_get_alarm()
334 static int ds1305_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_set_alarm() argument
344 status = rtc_tm_to_time(&alm->time, &later); in ds1305_set_alarm()
375 buf[1 + DS1305_SEC] = bin2bcd(alm->time.tm_sec); in ds1305_set_alarm()
376 buf[1 + DS1305_MIN] = bin2bcd(alm->time.tm_min); in ds1305_set_alarm()
377 buf[1 + DS1305_HOUR] = hour2bcd(ds1305->hr12, alm->time.tm_hour); in ds1305_set_alarm()
389 if (alm->enabled) { in ds1305_set_alarm()