Lines Matching refs:t
326 static int rx8025_read_alarm(struct device *dev, struct rtc_wkalrm *t) in rx8025_read_alarm() argument
345 t->time.tm_sec = 0; in rx8025_read_alarm()
346 t->time.tm_min = bcd2bin(ald[0] & 0x7f); in rx8025_read_alarm()
348 t->time.tm_hour = bcd2bin(ald[1] & 0x3f); in rx8025_read_alarm()
350 t->time.tm_hour = bcd2bin(ald[1] & 0x1f) % 12 in rx8025_read_alarm()
353 dev_dbg(dev, "%s: date: %ptRr\n", __func__, &t->time); in rx8025_read_alarm()
354 t->enabled = !!(rx8025->ctrl1 & RX8025_BIT_CTRL1_DALE); in rx8025_read_alarm()
355 t->pending = (ctrl2 & RX8025_BIT_CTRL2_DAFG) && t->enabled; in rx8025_read_alarm()
360 static int rx8025_set_alarm(struct device *dev, struct rtc_wkalrm *t) in rx8025_set_alarm() argument
367 ald[0] = bin2bcd(t->time.tm_min); in rx8025_set_alarm()
369 ald[1] = bin2bcd(t->time.tm_hour); in rx8025_set_alarm()
371 ald[1] = (t->time.tm_hour >= 12 ? 0x20 : 0) in rx8025_set_alarm()
372 | bin2bcd((t->time.tm_hour + 11) % 12 + 1); in rx8025_set_alarm()
387 if (t->enabled) { in rx8025_set_alarm()