Lines Matching refs:bin2bcd
157 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
158 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon)); in rtc_set()
161 bin2bcd (tmp->tm_wday + 1) | MCP7941X_BIT_VBATEN); in rtc_set()
163 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
165 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
166 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
167 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
169 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec) | MCP7941X_BIT_ST); in rtc_set()
171 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
224 buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); in ds1307_rtc_set()
225 buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon); in ds1307_rtc_set()
226 buf[RTC_DAY_REG_ADDR] = bin2bcd(tm->tm_wday + 1); in ds1307_rtc_set()
227 buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); in ds1307_rtc_set()
228 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in ds1307_rtc_set()
229 buf[RTC_MIN_REG_ADDR] = bin2bcd(tm->tm_min); in ds1307_rtc_set()
230 buf[RTC_SEC_REG_ADDR] = bin2bcd(tm->tm_sec); in ds1307_rtc_set()