Lines Matching defs:alm
291 static int ds1305_get_alarm(struct device *dev, struct rtc_wkalrm *alm)
310 alm->enabled = !!(ds1305->ctrl[0] & DS1305_AEI0);
311 alm->pending = !!(ds1305->ctrl[1] & DS1305_AEI0);
329 /* Stuff these values into alm->time and let RTC framework code
333 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]);
334 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]);
335 alm->time.tm_hour = bcd2hour(buf[DS1305_HOUR]);
336 alm->time.tm_mday = -1;
337 alm->time.tm_mon = -1;
338 alm->time.tm_year = -1;
340 alm->time.tm_wday = -1;
341 alm->time.tm_mday = -1;
342 alm->time.tm_isdst = -1;
350 static int ds1305_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
360 status = rtc_tm_to_time(&alm->time, &later);
391 buf[1 + DS1305_SEC] = bin2bcd(alm->time.tm_sec);
392 buf[1 + DS1305_MIN] = bin2bcd(alm->time.tm_min);
393 buf[1 + DS1305_HOUR] = hour2bcd(ds1305->hr12, alm->time.tm_hour);
405 if (alm->enabled) {