Lines Matching refs:rbuff
42 static void as3722_time_to_reg(u8 *rbuff, struct rtc_time *tm) in as3722_time_to_reg() argument
44 rbuff[0] = bin2bcd(tm->tm_sec); in as3722_time_to_reg()
45 rbuff[1] = bin2bcd(tm->tm_min); in as3722_time_to_reg()
46 rbuff[2] = bin2bcd(tm->tm_hour); in as3722_time_to_reg()
47 rbuff[3] = bin2bcd(tm->tm_mday); in as3722_time_to_reg()
48 rbuff[4] = bin2bcd(tm->tm_mon + 1); in as3722_time_to_reg()
49 rbuff[5] = bin2bcd(tm->tm_year - (AS3722_RTC_START_YEAR - 1900)); in as3722_time_to_reg()
52 static void as3722_reg_to_time(u8 *rbuff, struct rtc_time *tm) in as3722_reg_to_time() argument
54 tm->tm_sec = bcd2bin(rbuff[0] & 0x7F); in as3722_reg_to_time()
55 tm->tm_min = bcd2bin(rbuff[1] & 0x7F); in as3722_reg_to_time()
56 tm->tm_hour = bcd2bin(rbuff[2] & 0x3F); in as3722_reg_to_time()
57 tm->tm_mday = bcd2bin(rbuff[3] & 0x3F); in as3722_reg_to_time()
58 tm->tm_mon = bcd2bin(rbuff[4] & 0x1F) - 1; in as3722_reg_to_time()
59 tm->tm_year = (AS3722_RTC_START_YEAR - 1900) + bcd2bin(rbuff[5] & 0x7F); in as3722_reg_to_time()