Lines Matching refs:alm
107 static int rc5t583_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_read_alarm() argument
121 alm->time.tm_sec = 0; in rc5t583_rtc_read_alarm()
122 alm->time.tm_min = bcd2bin(alarm_data[0]); in rc5t583_rtc_read_alarm()
123 alm->time.tm_hour = bcd2bin(alarm_data[1]); in rc5t583_rtc_read_alarm()
124 alm->time.tm_mday = bcd2bin(alarm_data[2]); in rc5t583_rtc_read_alarm()
125 alm->time.tm_mon = bcd2bin(alarm_data[3]) - 1; in rc5t583_rtc_read_alarm()
126 alm->time.tm_year = bcd2bin(alarm_data[4]) + 100; in rc5t583_rtc_read_alarm()
134 alm->enabled = 1; in rc5t583_rtc_read_alarm()
139 static int rc5t583_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_set_alarm() argument
149 alarm_data[0] = bin2bcd(alm->time.tm_min); in rc5t583_rtc_set_alarm()
150 alarm_data[1] = bin2bcd(alm->time.tm_hour); in rc5t583_rtc_set_alarm()
151 alarm_data[2] = bin2bcd(alm->time.tm_mday); in rc5t583_rtc_set_alarm()
152 alarm_data[3] = bin2bcd(alm->time.tm_mon + 1); in rc5t583_rtc_set_alarm()
153 alarm_data[4] = bin2bcd(alm->time.tm_year - 100); in rc5t583_rtc_set_alarm()
162 if (alm->enabled) in rc5t583_rtc_set_alarm()