Lines Matching refs:date
226 u8 date[7]; in rv3032_get_time() local
236 ret = regmap_bulk_read(rv3032->regmap, RV3032_SEC, date, sizeof(date)); in rv3032_get_time()
240 tm->tm_sec = bcd2bin(date[0] & 0x7f); in rv3032_get_time()
241 tm->tm_min = bcd2bin(date[1] & 0x7f); in rv3032_get_time()
242 tm->tm_hour = bcd2bin(date[2] & 0x3f); in rv3032_get_time()
243 tm->tm_wday = date[3] & 0x7; in rv3032_get_time()
244 tm->tm_mday = bcd2bin(date[4] & 0x3f); in rv3032_get_time()
245 tm->tm_mon = bcd2bin(date[5] & 0x1f) - 1; in rv3032_get_time()
246 tm->tm_year = bcd2bin(date[6]) + 100; in rv3032_get_time()
254 u8 date[7]; in rv3032_set_time() local
257 date[0] = bin2bcd(tm->tm_sec); in rv3032_set_time()
258 date[1] = bin2bcd(tm->tm_min); in rv3032_set_time()
259 date[2] = bin2bcd(tm->tm_hour); in rv3032_set_time()
260 date[3] = tm->tm_wday; in rv3032_set_time()
261 date[4] = bin2bcd(tm->tm_mday); in rv3032_set_time()
262 date[5] = bin2bcd(tm->tm_mon + 1); in rv3032_set_time()
263 date[6] = bin2bcd(tm->tm_year - 100); in rv3032_set_time()
265 ret = regmap_bulk_write(rv3032->regmap, RV3032_SEC, date, in rv3032_set_time()
266 sizeof(date)); in rv3032_set_time()