Lines Matching refs:alarm
181 static int ds3232_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) in ds3232_read_alarm() argument
198 alarm->time.tm_sec = bcd2bin(buf[0] & 0x7F); in ds3232_read_alarm()
199 alarm->time.tm_min = bcd2bin(buf[1] & 0x7F); in ds3232_read_alarm()
200 alarm->time.tm_hour = bcd2bin(buf[2] & 0x7F); in ds3232_read_alarm()
201 alarm->time.tm_mday = bcd2bin(buf[3] & 0x7F); in ds3232_read_alarm()
203 alarm->enabled = !!(control & DS3232_REG_CR_A1IE); in ds3232_read_alarm()
204 alarm->pending = !!(stat & DS3232_REG_SR_A1F); in ds3232_read_alarm()
215 static int ds3232_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) in ds3232_set_alarm() argument
225 buf[0] = bin2bcd(alarm->time.tm_sec); in ds3232_set_alarm()
226 buf[1] = bin2bcd(alarm->time.tm_min); in ds3232_set_alarm()
227 buf[2] = bin2bcd(alarm->time.tm_hour); in ds3232_set_alarm()
228 buf[3] = bin2bcd(alarm->time.tm_mday); in ds3232_set_alarm()
252 if (alarm->enabled) { in ds3232_set_alarm()