Lines Matching refs:alm
276 static int s35390a_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in s35390a_rtc_set_alarm() argument
284 "mon=%d, year=%d, wday=%d\n", __func__, alm->time.tm_sec, in s35390a_rtc_set_alarm()
285 alm->time.tm_min, alm->time.tm_hour, alm->time.tm_mday, in s35390a_rtc_set_alarm()
286 alm->time.tm_mon, alm->time.tm_year, alm->time.tm_wday); in s35390a_rtc_set_alarm()
298 if (alm->enabled) in s35390a_rtc_set_alarm()
308 if (alm->time.tm_wday != -1) in s35390a_rtc_set_alarm()
309 buf[S35390A_ALRM_BYTE_WDAY] = bin2bcd(alm->time.tm_wday) | 0x80; in s35390a_rtc_set_alarm()
314 alm->time.tm_hour) | 0x80; in s35390a_rtc_set_alarm()
315 buf[S35390A_ALRM_BYTE_MINS] = bin2bcd(alm->time.tm_min) | 0x80; in s35390a_rtc_set_alarm()
317 if (alm->time.tm_hour >= 12) in s35390a_rtc_set_alarm()
329 static int s35390a_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in s35390a_rtc_read_alarm() argument
345 alm->enabled = 0; in s35390a_rtc_read_alarm()
348 alm->enabled = 1; in s35390a_rtc_read_alarm()
364 alm->time.tm_wday = in s35390a_rtc_read_alarm()
368 alm->time.tm_hour = in s35390a_rtc_read_alarm()
373 alm->time.tm_min = bcd2bin(buf[S35390A_ALRM_BYTE_MINS] & ~0x80); in s35390a_rtc_read_alarm()
376 alm->time.tm_sec = 0; in s35390a_rtc_read_alarm()
379 __func__, alm->time.tm_min, alm->time.tm_hour, in s35390a_rtc_read_alarm()
380 alm->time.tm_wday); in s35390a_rtc_read_alarm()