Lines Matching refs:RV3029C2_A_SC
51 #define RV3029C2_A_SC 0x10 macro
203 ret = rv3029c2_i2c_read_regs(client, RV3029C2_A_SC, regs, in rv3029c2_i2c_read_alarm()
212 tm->tm_sec = bcd2bin(regs[RV3029C2_A_SC-RV3029C2_A_SC] & 0x7f); in rv3029c2_i2c_read_alarm()
213 tm->tm_min = bcd2bin(regs[RV3029C2_A_MN-RV3029C2_A_SC] & 0x7f); in rv3029c2_i2c_read_alarm()
214 tm->tm_hour = bcd2bin(regs[RV3029C2_A_HR-RV3029C2_A_SC] & 0x3f); in rv3029c2_i2c_read_alarm()
215 tm->tm_mday = bcd2bin(regs[RV3029C2_A_DT-RV3029C2_A_SC] & 0x3f); in rv3029c2_i2c_read_alarm()
216 tm->tm_mon = bcd2bin(regs[RV3029C2_A_MO-RV3029C2_A_SC] & 0x1f) - 1; in rv3029c2_i2c_read_alarm()
217 tm->tm_year = bcd2bin(regs[RV3029C2_A_YR-RV3029C2_A_SC] & 0x7f) + 100; in rv3029c2_i2c_read_alarm()
218 tm->tm_wday = bcd2bin(regs[RV3029C2_A_DW-RV3029C2_A_SC] & 0x07) - 1; in rv3029c2_i2c_read_alarm()
275 regs[RV3029C2_A_SC-RV3029C2_A_SC] = bin2bcd(tm->tm_sec & 0x7f); in rv3029c2_rtc_i2c_set_alarm()
276 regs[RV3029C2_A_MN-RV3029C2_A_SC] = bin2bcd(tm->tm_min & 0x7f); in rv3029c2_rtc_i2c_set_alarm()
277 regs[RV3029C2_A_HR-RV3029C2_A_SC] = bin2bcd(tm->tm_hour & 0x3f); in rv3029c2_rtc_i2c_set_alarm()
278 regs[RV3029C2_A_DT-RV3029C2_A_SC] = bin2bcd(tm->tm_mday & 0x3f); in rv3029c2_rtc_i2c_set_alarm()
279 regs[RV3029C2_A_MO-RV3029C2_A_SC] = bin2bcd((tm->tm_mon & 0x1f) - 1); in rv3029c2_rtc_i2c_set_alarm()
280 regs[RV3029C2_A_DW-RV3029C2_A_SC] = bin2bcd((tm->tm_wday & 7) - 1); in rv3029c2_rtc_i2c_set_alarm()
281 regs[RV3029C2_A_YR-RV3029C2_A_SC] = bin2bcd((tm->tm_year & 0x7f) - 100); in rv3029c2_rtc_i2c_set_alarm()
283 ret = rv3029c2_i2c_write_regs(client, RV3029C2_A_SC, regs, in rv3029c2_rtc_i2c_set_alarm()