Lines Matching refs:rbuff
33 static void as3722_time_to_reg(u8 *rbuff, struct rtc_time *tm) in as3722_time_to_reg() argument
35 rbuff[0] = bin2bcd(tm->tm_sec); in as3722_time_to_reg()
36 rbuff[1] = bin2bcd(tm->tm_min); in as3722_time_to_reg()
37 rbuff[2] = bin2bcd(tm->tm_hour); in as3722_time_to_reg()
38 rbuff[3] = bin2bcd(tm->tm_mday); in as3722_time_to_reg()
39 rbuff[4] = bin2bcd(tm->tm_mon + 1); in as3722_time_to_reg()
40 rbuff[5] = bin2bcd(tm->tm_year - (AS3722_RTC_START_YEAR - 1900)); in as3722_time_to_reg()
43 static void as3722_reg_to_time(u8 *rbuff, struct rtc_time *tm) in as3722_reg_to_time() argument
45 tm->tm_sec = bcd2bin(rbuff[0] & 0x7F); in as3722_reg_to_time()
46 tm->tm_min = bcd2bin(rbuff[1] & 0x7F); in as3722_reg_to_time()
47 tm->tm_hour = bcd2bin(rbuff[2] & 0x3F); in as3722_reg_to_time()
48 tm->tm_mday = bcd2bin(rbuff[3] & 0x3F); in as3722_reg_to_time()
49 tm->tm_mon = bcd2bin(rbuff[4] & 0x1F) - 1; in as3722_reg_to_time()
50 tm->tm_year = (AS3722_RTC_START_YEAR - 1900) + bcd2bin(rbuff[5] & 0x7F); in as3722_reg_to_time()