Lines Matching refs:alm
140 static int tps65910_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_read_alarm() argument
154 alm->time.tm_sec = bcd2bin(alarm_data[0]); in tps65910_rtc_read_alarm()
155 alm->time.tm_min = bcd2bin(alarm_data[1]); in tps65910_rtc_read_alarm()
156 alm->time.tm_hour = bcd2bin(alarm_data[2]); in tps65910_rtc_read_alarm()
157 alm->time.tm_mday = bcd2bin(alarm_data[3]); in tps65910_rtc_read_alarm()
158 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in tps65910_rtc_read_alarm()
159 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in tps65910_rtc_read_alarm()
166 alm->enabled = 1; in tps65910_rtc_read_alarm()
171 static int tps65910_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_set_alarm() argument
181 alarm_data[0] = bin2bcd(alm->time.tm_sec); in tps65910_rtc_set_alarm()
182 alarm_data[1] = bin2bcd(alm->time.tm_min); in tps65910_rtc_set_alarm()
183 alarm_data[2] = bin2bcd(alm->time.tm_hour); in tps65910_rtc_set_alarm()
184 alarm_data[3] = bin2bcd(alm->time.tm_mday); in tps65910_rtc_set_alarm()
185 alarm_data[4] = bin2bcd(alm->time.tm_mon + 1); in tps65910_rtc_set_alarm()
186 alarm_data[5] = bin2bcd(alm->time.tm_year - 100); in tps65910_rtc_set_alarm()
196 if (alm->enabled) in tps65910_rtc_set_alarm()