Home
last modified time | relevance | path

Searched refs:RV3029_W_SEC (Results 1 – 2 of 2) sorted by relevance

/openbmc/u-boot/drivers/rtc/
H A Drv3029.c51 #define RV3029_W_SEC 0x08 macro
79 ret = dm_i2c_read(dev, RV3029_W_SEC, regs, sizeof(regs)); in rv3029_rtc_get()
85 tm->tm_sec = bcd2bin(regs[RV3029_W_SEC - RV3029_W_SEC]); in rv3029_rtc_get()
86 tm->tm_min = bcd2bin(regs[RV3029_W_MINUTES - RV3029_W_SEC]); in rv3029_rtc_get()
90 const u8 _hr = regs[RV3029_W_HOURS - RV3029_W_SEC]; in rv3029_rtc_get()
103 tm->tm_mday = bcd2bin(regs[RV3029_W_DATE - RV3029_W_SEC]); in rv3029_rtc_get()
134 regs[RV3029_W_SEC - RV3029_W_SEC] = bin2bcd(tm->tm_sec); in rv3029_rtc_set()
135 regs[RV3029_W_MINUTES - RV3029_W_SEC] = bin2bcd(tm->tm_min); in rv3029_rtc_set()
136 regs[RV3029_W_HOURS - RV3029_W_SEC] = bin2bcd(tm->tm_hour); in rv3029_rtc_set()
137 regs[RV3029_W_DATE - RV3029_W_SEC] = bin2bcd(tm->tm_mday); in rv3029_rtc_set()
[all …]
/openbmc/linux/drivers/rtc/
H A Drtc-rv3029c2.c57 #define RV3029_W_SEC 0x08 macro
319 ret = regmap_bulk_read(rv3029->regmap, RV3029_W_SEC, regs, in rv3029_read_time()
324 tm->tm_sec = bcd2bin(regs[RV3029_W_SEC - RV3029_W_SEC]); in rv3029_read_time()
325 tm->tm_min = bcd2bin(regs[RV3029_W_MINUTES - RV3029_W_SEC]); in rv3029_read_time()
329 const u8 _hr = regs[RV3029_W_HOURS - RV3029_W_SEC]; in rv3029_read_time()
340 tm->tm_mday = bcd2bin(regs[RV3029_W_DATE - RV3029_W_SEC]); in rv3029_read_time()
428 regs[RV3029_W_SEC - RV3029_W_SEC] = bin2bcd(tm->tm_sec); in rv3029_set_time()
429 regs[RV3029_W_MINUTES - RV3029_W_SEC] = bin2bcd(tm->tm_min); in rv3029_set_time()
430 regs[RV3029_W_HOURS - RV3029_W_SEC] = bin2bcd(tm->tm_hour); in rv3029_set_time()
431 regs[RV3029_W_DATE - RV3029_W_SEC] = bin2bcd(tm->tm_mday); in rv3029_set_time()
[all …]