Lines Matching refs:date
238 u8 *date = date1; in rv8803_get_time() local
250 ret = rv8803_read_regs(rv8803->client, RV8803_SEC, 7, date); in rv8803_get_time()
260 date = date2; in rv8803_get_time()
263 tm->tm_sec = bcd2bin(date[RV8803_SEC] & 0x7f); in rv8803_get_time()
264 tm->tm_min = bcd2bin(date[RV8803_MIN] & 0x7f); in rv8803_get_time()
265 tm->tm_hour = bcd2bin(date[RV8803_HOUR] & 0x3f); in rv8803_get_time()
266 tm->tm_wday = ilog2(date[RV8803_WEEK] & 0x7f); in rv8803_get_time()
267 tm->tm_mday = bcd2bin(date[RV8803_DAY] & 0x3f); in rv8803_get_time()
268 tm->tm_mon = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1; in rv8803_get_time()
269 tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100; in rv8803_get_time()
277 u8 date[7]; in rv8803_set_time() local
290 date[RV8803_SEC] = bin2bcd(tm->tm_sec); in rv8803_set_time()
291 date[RV8803_MIN] = bin2bcd(tm->tm_min); in rv8803_set_time()
292 date[RV8803_HOUR] = bin2bcd(tm->tm_hour); in rv8803_set_time()
293 date[RV8803_WEEK] = 1 << (tm->tm_wday); in rv8803_set_time()
294 date[RV8803_DAY] = bin2bcd(tm->tm_mday); in rv8803_set_time()
295 date[RV8803_MONTH] = bin2bcd(tm->tm_mon + 1); in rv8803_set_time()
296 date[RV8803_YEAR] = bin2bcd(tm->tm_year - 100); in rv8803_set_time()
298 ret = rv8803_write_regs(rv8803->client, RV8803_SEC, 7, date); in rv8803_set_time()