Lines Matching defs:alrm
93 static int tx4939_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
101 if (alrm->time.tm_sec < 0 ||
102 alrm->time.tm_min < 0 ||
103 alrm->time.tm_hour < 0 ||
104 alrm->time.tm_mday < 0 ||
105 alrm->time.tm_mon < 0 ||
106 alrm->time.tm_year < 0)
108 rtc_tm_to_time(&alrm->time, &sec);
120 (alrm->enabled ? TX4939_RTCCTL_ALME : 0));
125 static int tx4939_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
146 alrm->enabled = (ctl & TX4939_RTCCTL_ALME) ? 1 : 0;
147 alrm->pending = (ctl & TX4939_RTCCTL_ALMD) ? 1 : 0;
150 rtc_time_to_tm(sec, &alrm->time);
151 return rtc_valid_tm(&alrm->time);