Lines Matching refs:buff
69 u8 buff[TPS80031_RTC_TIME_NUM_REGS]; in tps80031_rtc_read_time() local
73 TPS80031_SECONDS_REG, TPS80031_RTC_TIME_NUM_REGS, buff); in tps80031_rtc_read_time()
79 tm->tm_sec = bcd2bin(buff[0]); in tps80031_rtc_read_time()
80 tm->tm_min = bcd2bin(buff[1]); in tps80031_rtc_read_time()
81 tm->tm_hour = bcd2bin(buff[2]); in tps80031_rtc_read_time()
82 tm->tm_mday = bcd2bin(buff[3]); in tps80031_rtc_read_time()
83 tm->tm_mon = bcd2bin(buff[4]) - 1; in tps80031_rtc_read_time()
84 tm->tm_year = bcd2bin(buff[5]) + RTC_YEAR_OFFSET; in tps80031_rtc_read_time()
85 tm->tm_wday = bcd2bin(buff[6]); in tps80031_rtc_read_time()
91 u8 buff[7]; in tps80031_rtc_set_time() local
94 buff[0] = bin2bcd(tm->tm_sec); in tps80031_rtc_set_time()
95 buff[1] = bin2bcd(tm->tm_min); in tps80031_rtc_set_time()
96 buff[2] = bin2bcd(tm->tm_hour); in tps80031_rtc_set_time()
97 buff[3] = bin2bcd(tm->tm_mday); in tps80031_rtc_set_time()
98 buff[4] = bin2bcd(tm->tm_mon + 1); in tps80031_rtc_set_time()
99 buff[5] = bin2bcd(tm->tm_year % RTC_YEAR_OFFSET); in tps80031_rtc_set_time()
100 buff[6] = bin2bcd(tm->tm_wday); in tps80031_rtc_set_time()
112 TPS80031_RTC_TIME_NUM_REGS, buff); in tps80031_rtc_set_time()
145 u8 buff[TPS80031_RTC_ALARM_NUM_REGS]; in tps80031_rtc_set_alarm() local
148 buff[0] = bin2bcd(alrm->time.tm_sec); in tps80031_rtc_set_alarm()
149 buff[1] = bin2bcd(alrm->time.tm_min); in tps80031_rtc_set_alarm()
150 buff[2] = bin2bcd(alrm->time.tm_hour); in tps80031_rtc_set_alarm()
151 buff[3] = bin2bcd(alrm->time.tm_mday); in tps80031_rtc_set_alarm()
152 buff[4] = bin2bcd(alrm->time.tm_mon + 1); in tps80031_rtc_set_alarm()
153 buff[5] = bin2bcd(alrm->time.tm_year % RTC_YEAR_OFFSET); in tps80031_rtc_set_alarm()
156 TPS80031_RTC_ALARM_NUM_REGS, buff); in tps80031_rtc_set_alarm()
166 u8 buff[6]; in tps80031_rtc_read_alarm() local
171 TPS80031_RTC_ALARM_NUM_REGS, buff); in tps80031_rtc_read_alarm()
178 alrm->time.tm_sec = bcd2bin(buff[0]); in tps80031_rtc_read_alarm()
179 alrm->time.tm_min = bcd2bin(buff[1]); in tps80031_rtc_read_alarm()
180 alrm->time.tm_hour = bcd2bin(buff[2]); in tps80031_rtc_read_alarm()
181 alrm->time.tm_mday = bcd2bin(buff[3]); in tps80031_rtc_read_alarm()
182 alrm->time.tm_mon = bcd2bin(buff[4]) - 1; in tps80031_rtc_read_alarm()
183 alrm->time.tm_year = bcd2bin(buff[5]) + RTC_YEAR_OFFSET; in tps80031_rtc_read_alarm()