Lines Matching refs:alm
150 static int tps6594_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps6594_rtc_read_alarm() argument
162 alm->time.tm_sec = bcd2bin(alarm_data[0]); in tps6594_rtc_read_alarm()
163 alm->time.tm_min = bcd2bin(alarm_data[1]); in tps6594_rtc_read_alarm()
164 alm->time.tm_hour = bcd2bin(alarm_data[2]); in tps6594_rtc_read_alarm()
165 alm->time.tm_mday = bcd2bin(alarm_data[3]); in tps6594_rtc_read_alarm()
166 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in tps6594_rtc_read_alarm()
167 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in tps6594_rtc_read_alarm()
173 alm->enabled = int_val & TPS6594_BIT_IT_ALARM; in tps6594_rtc_read_alarm()
178 static int tps6594_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps6594_rtc_set_alarm() argument
189 alarm_data[0] = bin2bcd(alm->time.tm_sec); in tps6594_rtc_set_alarm()
190 alarm_data[1] = bin2bcd(alm->time.tm_min); in tps6594_rtc_set_alarm()
191 alarm_data[2] = bin2bcd(alm->time.tm_hour); in tps6594_rtc_set_alarm()
192 alarm_data[3] = bin2bcd(alm->time.tm_mday); in tps6594_rtc_set_alarm()
193 alarm_data[4] = bin2bcd(alm->time.tm_mon + 1); in tps6594_rtc_set_alarm()
194 alarm_data[5] = bin2bcd(alm->time.tm_year - 100); in tps6594_rtc_set_alarm()
202 if (alm->enabled) in tps6594_rtc_set_alarm()