Lines Matching refs:alm
112 static int palmas_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_read_alarm() argument
127 alm->time.tm_sec = bcd2bin(alarm_data[0]); in palmas_rtc_read_alarm()
128 alm->time.tm_min = bcd2bin(alarm_data[1]); in palmas_rtc_read_alarm()
129 alm->time.tm_hour = bcd2bin(alarm_data[2]); in palmas_rtc_read_alarm()
130 alm->time.tm_mday = bcd2bin(alarm_data[3]); in palmas_rtc_read_alarm()
131 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in palmas_rtc_read_alarm()
132 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in palmas_rtc_read_alarm()
142 alm->enabled = 1; in palmas_rtc_read_alarm()
146 static int palmas_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_set_alarm() argument
158 alarm_data[0] = bin2bcd(alm->time.tm_sec); in palmas_rtc_set_alarm()
159 alarm_data[1] = bin2bcd(alm->time.tm_min); in palmas_rtc_set_alarm()
160 alarm_data[2] = bin2bcd(alm->time.tm_hour); in palmas_rtc_set_alarm()
161 alarm_data[3] = bin2bcd(alm->time.tm_mday); in palmas_rtc_set_alarm()
162 alarm_data[4] = bin2bcd(alm->time.tm_mon + 1); in palmas_rtc_set_alarm()
163 alarm_data[5] = bin2bcd(alm->time.tm_year - 100); in palmas_rtc_set_alarm()
172 if (alm->enabled) in palmas_rtc_set_alarm()