Lines Matching refs:alarm
236 static int ds1343_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) in ds1343_read_alarm() argument
250 alarm->pending = !!(val & DS1343_IRQF0); in ds1343_read_alarm()
255 alarm->enabled = !!(val & DS1343_A0IE); in ds1343_read_alarm()
261 alarm->time.tm_sec = bcd2bin(buf[0]) & 0x7f; in ds1343_read_alarm()
262 alarm->time.tm_min = bcd2bin(buf[1]) & 0x7f; in ds1343_read_alarm()
263 alarm->time.tm_hour = bcd2bin(buf[2]) & 0x3f; in ds1343_read_alarm()
264 alarm->time.tm_mday = bcd2bin(buf[3]) & 0x3f; in ds1343_read_alarm()
269 static int ds1343_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) in ds1343_set_alarm() argument
282 buf[0] = bin2bcd(alarm->time.tm_sec); in ds1343_set_alarm()
283 buf[1] = bin2bcd(alarm->time.tm_min); in ds1343_set_alarm()
284 buf[2] = bin2bcd(alarm->time.tm_hour); in ds1343_set_alarm()
285 buf[3] = bin2bcd(alarm->time.tm_mday); in ds1343_set_alarm()
291 if (alarm->enabled) in ds1343_set_alarm()