Searched refs:bcd2bin (Results 1 - 98 of 98) sorted by relevance

/linux-4.1.27/arch/powerpc/platforms/powernv/
H A Dopal-rtc.c27 tm->tm_year = ((bcd2bin(y_m_d >> 24) * 100) + opal_to_tm()
28 bcd2bin((y_m_d >> 16) & 0xff)) - 1900; opal_to_tm()
29 tm->tm_mon = bcd2bin((y_m_d >> 8) & 0xff) - 1; opal_to_tm()
30 tm->tm_mday = bcd2bin(y_m_d & 0xff); opal_to_tm()
31 tm->tm_hour = bcd2bin((h_m_s_ms >> 56) & 0xff); opal_to_tm()
32 tm->tm_min = bcd2bin((h_m_s_ms >> 48) & 0xff); opal_to_tm()
33 tm->tm_sec = bcd2bin((h_m_s_ms >> 40) & 0xff); opal_to_tm()
/linux-4.1.27/arch/m68k/sun3x/
H A Dtime.c59 t->tm_sec = bcd2bin(h->sec); sun3x_hwclk()
60 t->tm_min = bcd2bin(h->min); sun3x_hwclk()
61 t->tm_hour = bcd2bin(h->hour); sun3x_hwclk()
62 t->tm_wday = bcd2bin(h->wday); sun3x_hwclk()
63 t->tm_mday = bcd2bin(h->mday); sun3x_hwclk()
64 t->tm_mon = bcd2bin(h->month); sun3x_hwclk()
65 t->tm_year = bcd2bin(h->year); sun3x_hwclk()
/linux-4.1.27/include/linux/
H A Dbcd.h6 #define bcd2bin(x) \ macro
/linux-4.1.27/drivers/rtc/
H A Drtc-max6902.c70 dt->tm_sec = bcd2bin(buf[0]); max6902_read_time()
71 dt->tm_min = bcd2bin(buf[1]); max6902_read_time()
72 dt->tm_hour = bcd2bin(buf[2]); max6902_read_time()
73 dt->tm_mday = bcd2bin(buf[3]); max6902_read_time()
74 dt->tm_mon = bcd2bin(buf[4]) - 1; max6902_read_time()
75 dt->tm_wday = bcd2bin(buf[5]); max6902_read_time()
76 dt->tm_year = bcd2bin(buf[6]); max6902_read_time()
83 century = bcd2bin(buf[0]) * 100; max6902_read_time()
H A Drtc-ds1216.c88 tm->tm_sec = bcd2bin(regs.sec); ds1216_rtc_read_time()
89 tm->tm_min = bcd2bin(regs.min); ds1216_rtc_read_time()
92 tm->tm_hour = bcd2bin(regs.hour & 0x1f); ds1216_rtc_read_time()
96 tm->tm_hour = bcd2bin(regs.hour & 0x3f); ds1216_rtc_read_time()
98 tm->tm_mday = bcd2bin(regs.mday & 0x3f); ds1216_rtc_read_time()
99 tm->tm_mon = bcd2bin(regs.month & 0x1f); ds1216_rtc_read_time()
100 tm->tm_year = bcd2bin(regs.year); ds1216_rtc_read_time()
H A Drtc-em3027.c72 tm->tm_sec = bcd2bin(buf[0]); em3027_get_time()
73 tm->tm_min = bcd2bin(buf[1]); em3027_get_time()
74 tm->tm_hour = bcd2bin(buf[2]); em3027_get_time()
75 tm->tm_mday = bcd2bin(buf[3]); em3027_get_time()
76 tm->tm_wday = bcd2bin(buf[4]); em3027_get_time()
77 tm->tm_mon = bcd2bin(buf[5]); em3027_get_time()
78 tm->tm_year = bcd2bin(buf[6]) + 100; em3027_get_time()
H A Drtc-m41t94.c85 tm->tm_sec = bcd2bin(spi_w8r8(spi, M41T94_REG_SECONDS)); m41t94_read_time()
86 tm->tm_min = bcd2bin(spi_w8r8(spi, M41T94_REG_MINUTES)); m41t94_read_time()
88 tm->tm_hour = bcd2bin(hour & 0x3f); m41t94_read_time()
89 tm->tm_wday = bcd2bin(spi_w8r8(spi, M41T94_REG_WDAY)) - 1; m41t94_read_time()
90 tm->tm_mday = bcd2bin(spi_w8r8(spi, M41T94_REG_DAY)); m41t94_read_time()
91 tm->tm_mon = bcd2bin(spi_w8r8(spi, M41T94_REG_MONTH)) - 1; m41t94_read_time()
92 tm->tm_year = bcd2bin(spi_w8r8(spi, M41T94_REG_YEAR)); m41t94_read_time()
H A Drtc-mv.c87 tm->tm_sec = bcd2bin(second); mv_rtc_read_time()
88 tm->tm_min = bcd2bin(minute); mv_rtc_read_time()
89 tm->tm_hour = bcd2bin(hour); mv_rtc_read_time()
90 tm->tm_mday = bcd2bin(day); mv_rtc_read_time()
91 tm->tm_wday = bcd2bin(wday); mv_rtc_read_time()
92 tm->tm_mon = bcd2bin(month) - 1; mv_rtc_read_time()
94 tm->tm_year = bcd2bin(year) + 100; mv_rtc_read_time()
118 alm->time.tm_sec = bcd2bin(second); mv_rtc_read_alarm()
119 alm->time.tm_min = bcd2bin(minute); mv_rtc_read_alarm()
120 alm->time.tm_hour = bcd2bin(hour); mv_rtc_read_alarm()
121 alm->time.tm_mday = bcd2bin(day); mv_rtc_read_alarm()
122 alm->time.tm_wday = bcd2bin(wday); mv_rtc_read_alarm()
123 alm->time.tm_mon = bcd2bin(month) - 1; mv_rtc_read_alarm()
125 alm->time.tm_year = bcd2bin(year) + 100; mv_rtc_read_alarm()
267 if (bcd2bin((rtc_date >> RTC_YEAR_OFFS) & 0xff) >= 38) { mv_rtc_probe()
H A Drtc-tps80031.c79 tm->tm_sec = bcd2bin(buff[0]); tps80031_rtc_read_time()
80 tm->tm_min = bcd2bin(buff[1]); tps80031_rtc_read_time()
81 tm->tm_hour = bcd2bin(buff[2]); tps80031_rtc_read_time()
82 tm->tm_mday = bcd2bin(buff[3]); tps80031_rtc_read_time()
83 tm->tm_mon = bcd2bin(buff[4]) - 1; tps80031_rtc_read_time()
84 tm->tm_year = bcd2bin(buff[5]) + RTC_YEAR_OFFSET; tps80031_rtc_read_time()
85 tm->tm_wday = bcd2bin(buff[6]); tps80031_rtc_read_time()
178 alrm->time.tm_sec = bcd2bin(buff[0]); tps80031_rtc_read_alarm()
179 alrm->time.tm_min = bcd2bin(buff[1]); tps80031_rtc_read_alarm()
180 alrm->time.tm_hour = bcd2bin(buff[2]); tps80031_rtc_read_alarm()
181 alrm->time.tm_mday = bcd2bin(buff[3]); tps80031_rtc_read_alarm()
182 alrm->time.tm_mon = bcd2bin(buff[4]) - 1; tps80031_rtc_read_alarm()
183 alrm->time.tm_year = bcd2bin(buff[5]) + RTC_YEAR_OFFSET; tps80031_rtc_read_alarm()
H A Drtc-fm3130.c121 t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_get_time()
122 t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_get_time()
124 t->tm_hour = bcd2bin(tmp); fm3130_get_time()
125 t->tm_wday = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1; fm3130_get_time()
126 t->tm_mday = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_get_time()
128 t->tm_mon = bcd2bin(tmp) - 1; fm3130_get_time()
131 t->tm_year = bcd2bin(fm3130->regs[FM3130_RTC_YEARS]) + 100; fm3130_get_time()
217 tm->tm_sec = bcd2bin(fm3130->regs[FM3130_ALARM_SECONDS] & 0x7F); fm3130_read_alarm()
218 tm->tm_min = bcd2bin(fm3130->regs[FM3130_ALARM_MINUTES] & 0x7F); fm3130_read_alarm()
219 tm->tm_hour = bcd2bin(fm3130->regs[FM3130_ALARM_HOURS] & 0x3F); fm3130_read_alarm()
220 tm->tm_mday = bcd2bin(fm3130->regs[FM3130_ALARM_DATE] & 0x3F); fm3130_read_alarm()
221 tm->tm_mon = bcd2bin(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F); fm3130_read_alarm()
451 tmp = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_probe()
455 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_probe()
459 tmp = bcd2bin(fm3130->regs[FM3130_RTC_HOURS] & 0x3f); fm3130_probe()
463 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_probe()
467 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f); fm3130_probe()
476 tmp = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_probe()
480 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_probe()
484 tmp = bcd2bin(fm3130->regs[FM3130_RTC_HOURS] & 0x3f); fm3130_probe()
488 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x7); fm3130_probe()
492 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_probe()
496 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f); fm3130_probe()
H A Drtc-bq4802.c75 tm->tm_sec = bcd2bin(tm->tm_sec); bq4802_read_time()
76 tm->tm_min = bcd2bin(tm->tm_min); bq4802_read_time()
77 tm->tm_hour = bcd2bin(tm->tm_hour); bq4802_read_time()
78 tm->tm_mday = bcd2bin(tm->tm_mday); bq4802_read_time()
79 tm->tm_mon = bcd2bin(tm->tm_mon); bq4802_read_time()
80 tm->tm_year = bcd2bin(tm->tm_year); bq4802_read_time()
81 tm->tm_wday = bcd2bin(tm->tm_wday); bq4802_read_time()
82 century = bcd2bin(century); bq4802_read_time()
H A Drtc-max6900.c153 tm->tm_sec = bcd2bin(regs[MAX6900_REG_SC]); max6900_i2c_read_time()
154 tm->tm_min = bcd2bin(regs[MAX6900_REG_MN]); max6900_i2c_read_time()
155 tm->tm_hour = bcd2bin(regs[MAX6900_REG_HR] & 0x3f); max6900_i2c_read_time()
156 tm->tm_mday = bcd2bin(regs[MAX6900_REG_DT]); max6900_i2c_read_time()
157 tm->tm_mon = bcd2bin(regs[MAX6900_REG_MO]) - 1; max6900_i2c_read_time()
158 tm->tm_year = bcd2bin(regs[MAX6900_REG_YR]) + max6900_i2c_read_time()
159 bcd2bin(regs[MAX6900_REG_CENTURY]) * 100 - 1900; max6900_i2c_read_time()
160 tm->tm_wday = bcd2bin(regs[MAX6900_REG_DW]); max6900_i2c_read_time()
H A Drtc-max8907.c63 tm->tm_year = bcd2bin(regs[RTC_YEAR2]) * 100 + regs_to_tm()
64 bcd2bin(regs[RTC_YEAR1]) - 1900; regs_to_tm()
65 tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1; regs_to_tm()
66 tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f); regs_to_tm()
69 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f); regs_to_tm()
75 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x03f); regs_to_tm()
77 tm->tm_min = bcd2bin(regs[RTC_MIN] & 0x7f); regs_to_tm()
78 tm->tm_sec = bcd2bin(regs[RTC_SEC] & 0x7f); regs_to_tm()
H A Drtc-rc5t583.c82 tm->tm_sec = bcd2bin(rtc_data[0]); rc5t583_rtc_read_time()
83 tm->tm_min = bcd2bin(rtc_data[1]); rc5t583_rtc_read_time()
84 tm->tm_hour = bcd2bin(rtc_data[2]); rc5t583_rtc_read_time()
85 tm->tm_wday = bcd2bin(rtc_data[3]); rc5t583_rtc_read_time()
86 tm->tm_mday = bcd2bin(rtc_data[4]); rc5t583_rtc_read_time()
87 tm->tm_mon = bcd2bin(rtc_data[5]) - 1; rc5t583_rtc_read_time()
88 tm->tm_year = bcd2bin(rtc_data[6]) + 100; rc5t583_rtc_read_time()
131 alm->time.tm_min = bcd2bin(alarm_data[0]); rc5t583_rtc_read_alarm()
132 alm->time.tm_hour = bcd2bin(alarm_data[1]); rc5t583_rtc_read_alarm()
133 alm->time.tm_mday = bcd2bin(alarm_data[2]); rc5t583_rtc_read_alarm()
134 alm->time.tm_mon = bcd2bin(alarm_data[3]) - 1; rc5t583_rtc_read_alarm()
135 alm->time.tm_year = bcd2bin(alarm_data[4]) + 100; rc5t583_rtc_read_alarm()
H A Drtc-tps65910.c77 tm->tm_sec = bcd2bin(rtc_data[0]); tps65910_rtc_read_time()
78 tm->tm_min = bcd2bin(rtc_data[1]); tps65910_rtc_read_time()
79 tm->tm_hour = bcd2bin(rtc_data[2]); tps65910_rtc_read_time()
80 tm->tm_mday = bcd2bin(rtc_data[3]); tps65910_rtc_read_time()
81 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; tps65910_rtc_read_time()
82 tm->tm_year = bcd2bin(rtc_data[5]) + 100; tps65910_rtc_read_time()
142 alm->time.tm_sec = bcd2bin(alarm_data[0]); tps65910_rtc_read_alarm()
143 alm->time.tm_min = bcd2bin(alarm_data[1]); tps65910_rtc_read_alarm()
144 alm->time.tm_hour = bcd2bin(alarm_data[2]); tps65910_rtc_read_alarm()
145 alm->time.tm_mday = bcd2bin(alarm_data[3]); tps65910_rtc_read_alarm()
146 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; tps65910_rtc_read_alarm()
147 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; tps65910_rtc_read_alarm()
H A Drtc-rv3029c2.c162 tm->tm_sec = bcd2bin(regs[RV3029C2_W_SEC-RV3029C2_W_SEC]); rv3029c2_i2c_read_time()
163 tm->tm_min = bcd2bin(regs[RV3029C2_W_MINUTES-RV3029C2_W_SEC]); rv3029c2_i2c_read_time()
170 tm->tm_hour = bcd2bin(_hr & 0x1f); rv3029c2_i2c_read_time()
174 tm->tm_hour = bcd2bin(_hr & 0x3f); rv3029c2_i2c_read_time()
177 tm->tm_mday = bcd2bin(regs[RV3029C2_W_DATE-RV3029C2_W_SEC]); rv3029c2_i2c_read_time()
178 tm->tm_mon = bcd2bin(regs[RV3029C2_W_MONTHS-RV3029C2_W_SEC]) - 1; rv3029c2_i2c_read_time()
179 tm->tm_year = bcd2bin(regs[RV3029C2_W_YEARS-RV3029C2_W_SEC]) + 100; rv3029c2_i2c_read_time()
180 tm->tm_wday = bcd2bin(regs[RV3029C2_W_DAYS-RV3029C2_W_SEC]) - 1; rv3029c2_i2c_read_time()
212 tm->tm_sec = bcd2bin(regs[RV3029C2_A_SC-RV3029C2_A_SC] & 0x7f); rv3029c2_i2c_read_alarm()
213 tm->tm_min = bcd2bin(regs[RV3029C2_A_MN-RV3029C2_A_SC] & 0x7f); rv3029c2_i2c_read_alarm()
214 tm->tm_hour = bcd2bin(regs[RV3029C2_A_HR-RV3029C2_A_SC] & 0x3f); rv3029c2_i2c_read_alarm()
215 tm->tm_mday = bcd2bin(regs[RV3029C2_A_DT-RV3029C2_A_SC] & 0x3f); rv3029c2_i2c_read_alarm()
216 tm->tm_mon = bcd2bin(regs[RV3029C2_A_MO-RV3029C2_A_SC] & 0x1f) - 1; rv3029c2_i2c_read_alarm()
217 tm->tm_year = bcd2bin(regs[RV3029C2_A_YR-RV3029C2_A_SC] & 0x7f) + 100; rv3029c2_i2c_read_alarm()
218 tm->tm_wday = bcd2bin(regs[RV3029C2_A_DW-RV3029C2_A_SC] & 0x07) - 1; rv3029c2_i2c_read_alarm()
H A Drtc-ds1302.c146 tm->tm_sec = bcd2bin(ds1302_readbyte(RTC_ADDR_SEC)); ds1302_rtc_read_time()
147 tm->tm_min = bcd2bin(ds1302_readbyte(RTC_ADDR_MIN)); ds1302_rtc_read_time()
148 tm->tm_hour = bcd2bin(ds1302_readbyte(RTC_ADDR_HOUR)); ds1302_rtc_read_time()
149 tm->tm_wday = bcd2bin(ds1302_readbyte(RTC_ADDR_DAY)); ds1302_rtc_read_time()
150 tm->tm_mday = bcd2bin(ds1302_readbyte(RTC_ADDR_DATE)); ds1302_rtc_read_time()
151 tm->tm_mon = bcd2bin(ds1302_readbyte(RTC_ADDR_MON)) - 1; ds1302_rtc_read_time()
152 tm->tm_year = bcd2bin(ds1302_readbyte(RTC_ADDR_YEAR)); ds1302_rtc_read_time()
H A Drtc-ds1347.c69 dt->tm_sec = bcd2bin(buf[0]); ds1347_read_time()
70 dt->tm_min = bcd2bin(buf[1]); ds1347_read_time()
71 dt->tm_hour = bcd2bin(buf[2] & 0x3F); ds1347_read_time()
72 dt->tm_mday = bcd2bin(buf[3]); ds1347_read_time()
73 dt->tm_mon = bcd2bin(buf[4]) - 1; ds1347_read_time()
74 dt->tm_wday = bcd2bin(buf[5]) - 1; ds1347_read_time()
75 dt->tm_year = bcd2bin(buf[6]) + 100; ds1347_read_time()
H A Drtc-ds1390.c86 dt->tm_sec = bcd2bin(chip->txrx_buf[0]); ds1390_read_time()
87 dt->tm_min = bcd2bin(chip->txrx_buf[1]); ds1390_read_time()
88 dt->tm_hour = bcd2bin(chip->txrx_buf[2]); ds1390_read_time()
89 dt->tm_wday = bcd2bin(chip->txrx_buf[3]); ds1390_read_time()
90 dt->tm_mday = bcd2bin(chip->txrx_buf[4]); ds1390_read_time()
92 dt->tm_mon = bcd2bin(chip->txrx_buf[5] & 0x7f) - 1; ds1390_read_time()
94 dt->tm_year = bcd2bin(chip->txrx_buf[6]) + ((chip->txrx_buf[5] & 0x80) ? 100 : 0); ds1390_read_time()
H A Drtc-ds3234.c70 dt->tm_sec = bcd2bin(buf[0]); ds3234_read_time()
71 dt->tm_min = bcd2bin(buf[1]); ds3234_read_time()
72 dt->tm_hour = bcd2bin(buf[2] & 0x3f); ds3234_read_time()
73 dt->tm_wday = bcd2bin(buf[3]) - 1; /* 0 = Sun */ ds3234_read_time()
74 dt->tm_mday = bcd2bin(buf[4]); ds3234_read_time()
75 dt->tm_mon = bcd2bin(buf[5] & 0x1f) - 1; /* 0 = Jan */ ds3234_read_time()
76 dt->tm_year = bcd2bin(buf[6] & 0xff) + 100; /* Assume 20YY */ ds3234_read_time()
H A Drtc-m41t93.c146 tm->tm_sec = bcd2bin(buf[M41T93_REG_ST_SEC]); m41t93_get_time()
147 tm->tm_min = bcd2bin(buf[M41T93_REG_MIN]); m41t93_get_time()
148 tm->tm_hour = bcd2bin(buf[M41T93_REG_CENT_HOUR] & 0x3f); m41t93_get_time()
149 tm->tm_mday = bcd2bin(buf[M41T93_REG_DAY]); m41t93_get_time()
150 tm->tm_mon = bcd2bin(buf[M41T93_REG_MON]) - 1; m41t93_get_time()
151 tm->tm_wday = bcd2bin(buf[M41T93_REG_WDAY] & 0x0f) - 1; m41t93_get_time()
154 tm->tm_year = bcd2bin(buf[M41T93_REG_YEAR]) + century_after_1900 * 100; m41t93_get_time()
H A Drtc-m48t86.c65 tm->tm_sec = bcd2bin(ops->readbyte(M48T86_REG_SEC)); m48t86_rtc_read_time()
66 tm->tm_min = bcd2bin(ops->readbyte(M48T86_REG_MIN)); m48t86_rtc_read_time()
67 tm->tm_hour = bcd2bin(ops->readbyte(M48T86_REG_HOUR) & 0x3F); m48t86_rtc_read_time()
68 tm->tm_mday = bcd2bin(ops->readbyte(M48T86_REG_DOM)); m48t86_rtc_read_time()
70 tm->tm_mon = bcd2bin(ops->readbyte(M48T86_REG_MONTH)) - 1; m48t86_rtc_read_time()
71 tm->tm_year = bcd2bin(ops->readbyte(M48T86_REG_YEAR)) + 100; m48t86_rtc_read_time()
72 tm->tm_wday = bcd2bin(ops->readbyte(M48T86_REG_DOW)); m48t86_rtc_read_time()
H A Drtc-vt8500.c117 tm->tm_sec = bcd2bin(time & TIME_SEC_MASK); vt8500_rtc_read_time()
118 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); vt8500_rtc_read_time()
119 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); vt8500_rtc_read_time()
120 tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); vt8500_rtc_read_time()
121 tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S) - 1; vt8500_rtc_read_time()
122 tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) vt8500_rtc_read_time()
161 alrm->time.tm_mday = bcd2bin((alarm & ALARM_DAY_MASK) >> ALARM_DAY_S); vt8500_rtc_read_alarm()
162 alrm->time.tm_hour = bcd2bin((alarm & TIME_HOUR_MASK) >> TIME_HOUR_S); vt8500_rtc_read_alarm()
163 alrm->time.tm_min = bcd2bin((alarm & TIME_MIN_MASK) >> TIME_MIN_S); vt8500_rtc_read_alarm()
164 alrm->time.tm_sec = bcd2bin((alarm & TIME_SEC_MASK)); vt8500_rtc_read_alarm()
H A Drtc-rk808.c97 tm->tm_sec = bcd2bin(rtc_data[0] & SECONDS_REG_MSK); rk808_rtc_readtime()
98 tm->tm_min = bcd2bin(rtc_data[1] & MINUTES_REG_MAK); rk808_rtc_readtime()
99 tm->tm_hour = bcd2bin(rtc_data[2] & HOURS_REG_MSK); rk808_rtc_readtime()
100 tm->tm_mday = bcd2bin(rtc_data[3] & DAYS_REG_MSK); rk808_rtc_readtime()
101 tm->tm_mon = (bcd2bin(rtc_data[4] & MONTHS_REG_MSK)) - 1; rk808_rtc_readtime()
102 tm->tm_year = (bcd2bin(rtc_data[5] & YEARS_REG_MSK)) + 100; rk808_rtc_readtime()
103 tm->tm_wday = bcd2bin(rtc_data[6] & WEEKS_REG_MSK); rk808_rtc_readtime()
167 alrm->time.tm_sec = bcd2bin(alrm_data[0] & SECONDS_REG_MSK); rk808_rtc_readalarm()
168 alrm->time.tm_min = bcd2bin(alrm_data[1] & MINUTES_REG_MAK); rk808_rtc_readalarm()
169 alrm->time.tm_hour = bcd2bin(alrm_data[2] & HOURS_REG_MSK); rk808_rtc_readalarm()
170 alrm->time.tm_mday = bcd2bin(alrm_data[3] & DAYS_REG_MSK); rk808_rtc_readalarm()
171 alrm->time.tm_mon = (bcd2bin(alrm_data[4] & MONTHS_REG_MSK)) - 1; rk808_rtc_readalarm()
172 alrm->time.tm_year = (bcd2bin(alrm_data[5] & YEARS_REG_MSK)) + 100; rk808_rtc_readalarm()
H A Drtc-ds3232.c135 time->tm_sec = bcd2bin(second); ds3232_read_time()
136 time->tm_min = bcd2bin(minute); ds3232_read_time()
140 time->tm_hour = bcd2bin(hour & 0x1F) + 12; ds3232_read_time()
142 time->tm_hour = bcd2bin(hour & 0x1F); ds3232_read_time()
144 time->tm_hour = bcd2bin(hour); ds3232_read_time()
148 time->tm_wday = bcd2bin(week) - 1; ds3232_read_time()
149 time->tm_mday = bcd2bin(day); ds3232_read_time()
151 time->tm_mon = bcd2bin(month & 0x7F) - 1; ds3232_read_time()
155 time->tm_year = bcd2bin(year) + add_century; ds3232_read_time()
213 alarm->time.tm_sec = bcd2bin(buf[0] & 0x7F); ds3232_read_alarm()
214 alarm->time.tm_min = bcd2bin(buf[1] & 0x7F); ds3232_read_alarm()
215 alarm->time.tm_hour = bcd2bin(buf[2] & 0x7F); ds3232_read_alarm()
216 alarm->time.tm_mday = bcd2bin(buf[3] & 0x7F); ds3232_read_alarm()
299 buf[0] = bcd2bin(buf[0]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? ds3232_update_alarm()
301 buf[1] = bcd2bin(buf[1]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? ds3232_update_alarm()
303 buf[2] = bcd2bin(buf[2]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? ds3232_update_alarm()
305 buf[3] = bcd2bin(buf[3]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? ds3232_update_alarm()
H A Drtc-m48t35.c73 tm->tm_sec = bcd2bin(tm->tm_sec); m48t35_read_time()
74 tm->tm_min = bcd2bin(tm->tm_min); m48t35_read_time()
75 tm->tm_hour = bcd2bin(tm->tm_hour); m48t35_read_time()
76 tm->tm_mday = bcd2bin(tm->tm_mday); m48t35_read_time()
77 tm->tm_mon = bcd2bin(tm->tm_mon); m48t35_read_time()
78 tm->tm_year = bcd2bin(tm->tm_year); m48t35_read_time()
H A Drtc-pcf85063.c70 tm->tm_sec = bcd2bin(buf[PCF85063_REG_SC] & 0x7F); pcf85063_get_datetime()
71 tm->tm_min = bcd2bin(buf[PCF85063_REG_MN] & 0x7F); pcf85063_get_datetime()
72 tm->tm_hour = bcd2bin(buf[PCF85063_REG_HR] & 0x3F); /* rtc hr 0-23 */ pcf85063_get_datetime()
73 tm->tm_mday = bcd2bin(buf[PCF85063_REG_DM] & 0x3F); pcf85063_get_datetime()
75 tm->tm_mon = bcd2bin(buf[PCF85063_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ pcf85063_get_datetime()
76 tm->tm_year = bcd2bin(buf[PCF85063_REG_YR]); pcf85063_get_datetime()
H A Drtc-r9701.c83 dt->tm_sec = bcd2bin(buf[0]); /* RSECCNT */ r9701_get_datetime()
84 dt->tm_min = bcd2bin(buf[1]); /* RMINCNT */ r9701_get_datetime()
85 dt->tm_hour = bcd2bin(buf[2]); /* RHRCNT */ r9701_get_datetime()
87 dt->tm_mday = bcd2bin(buf[3]); /* RDAYCNT */ r9701_get_datetime()
88 dt->tm_mon = bcd2bin(buf[4]) - 1; /* RMONCNT */ r9701_get_datetime()
89 dt->tm_year = bcd2bin(buf[5]) + 100; /* RYRCNT */ r9701_get_datetime()
H A Drtc-palmas.c69 tm->tm_sec = bcd2bin(rtc_data[0]); palmas_rtc_read_time()
70 tm->tm_min = bcd2bin(rtc_data[1]); palmas_rtc_read_time()
71 tm->tm_hour = bcd2bin(rtc_data[2]); palmas_rtc_read_time()
72 tm->tm_mday = bcd2bin(rtc_data[3]); palmas_rtc_read_time()
73 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; palmas_rtc_read_time()
74 tm->tm_year = bcd2bin(rtc_data[5]) + 100; palmas_rtc_read_time()
140 alm->time.tm_sec = bcd2bin(alarm_data[0]); palmas_rtc_read_alarm()
141 alm->time.tm_min = bcd2bin(alarm_data[1]); palmas_rtc_read_alarm()
142 alm->time.tm_hour = bcd2bin(alarm_data[2]); palmas_rtc_read_alarm()
143 alm->time.tm_mday = bcd2bin(alarm_data[3]); palmas_rtc_read_alarm()
144 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; palmas_rtc_read_alarm()
145 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; palmas_rtc_read_alarm()
H A Drtc-isl1208.c296 tm->tm_sec = bcd2bin(regs[ISL1208_REG_SC]); isl1208_i2c_read_time()
297 tm->tm_min = bcd2bin(regs[ISL1208_REG_MN]); isl1208_i2c_read_time()
303 tm->tm_hour = bcd2bin(_hr & 0x3f); isl1208_i2c_read_time()
306 tm->tm_hour = bcd2bin(_hr & 0x1f); isl1208_i2c_read_time()
312 tm->tm_mday = bcd2bin(regs[ISL1208_REG_DT]); isl1208_i2c_read_time()
313 tm->tm_mon = bcd2bin(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */ isl1208_i2c_read_time()
314 tm->tm_year = bcd2bin(regs[ISL1208_REG_YR]) + 100; isl1208_i2c_read_time()
315 tm->tm_wday = bcd2bin(regs[ISL1208_REG_DW]); isl1208_i2c_read_time()
341 tm->tm_sec = bcd2bin(regs[ISL1208_REG_SCA - ISL1208_REG_SCA] & 0x7f); isl1208_i2c_read_alarm()
342 tm->tm_min = bcd2bin(regs[ISL1208_REG_MNA - ISL1208_REG_SCA] & 0x7f); isl1208_i2c_read_alarm()
343 tm->tm_hour = bcd2bin(regs[ISL1208_REG_HRA - ISL1208_REG_SCA] & 0x3f); isl1208_i2c_read_alarm()
344 tm->tm_mday = bcd2bin(regs[ISL1208_REG_DTA - ISL1208_REG_SCA] & 0x3f); isl1208_i2c_read_alarm()
346 bcd2bin(regs[ISL1208_REG_MOA - ISL1208_REG_SCA] & 0x1f) - 1; isl1208_i2c_read_alarm()
347 tm->tm_wday = bcd2bin(regs[ISL1208_REG_DWA - ISL1208_REG_SCA] & 0x03); isl1208_i2c_read_alarm()
355 tm->tm_year = bcd2bin(yr) + 100; isl1208_i2c_read_alarm()
H A Drtc-ds1742.c110 tm->tm_sec = bcd2bin(second); ds1742_rtc_read_time()
111 tm->tm_min = bcd2bin(minute); ds1742_rtc_read_time()
112 tm->tm_hour = bcd2bin(hour); ds1742_rtc_read_time()
113 tm->tm_mday = bcd2bin(day); ds1742_rtc_read_time()
114 tm->tm_wday = bcd2bin(week); ds1742_rtc_read_time()
115 tm->tm_mon = bcd2bin(month) - 1; ds1742_rtc_read_time()
117 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; ds1742_rtc_read_time()
H A Drtc-max8998.c83 tm->tm_sec = bcd2bin(data[RTC_SEC]); max8998_data_to_tm()
84 tm->tm_min = bcd2bin(data[RTC_MIN]); max8998_data_to_tm()
86 tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f); max8998_data_to_tm()
90 tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f); max8998_data_to_tm()
93 tm->tm_mday = bcd2bin(data[RTC_DATE]); max8998_data_to_tm()
94 tm->tm_mon = bcd2bin(data[RTC_MONTH]); max8998_data_to_tm()
95 tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100; max8998_data_to_tm()
H A Drtc-s35390a.c142 return bcd2bin(reg & 0x3f); s35390a_reg2hr()
144 hour = bcd2bin(reg & 0x3f); s35390a_reg2hr()
193 tm->tm_sec = bcd2bin(buf[S35390A_BYTE_SECS]); s35390a_get_datetime()
194 tm->tm_min = bcd2bin(buf[S35390A_BYTE_MINS]); s35390a_get_datetime()
196 tm->tm_wday = bcd2bin(buf[S35390A_BYTE_WDAY]); s35390a_get_datetime()
197 tm->tm_mday = bcd2bin(buf[S35390A_BYTE_DAY]); s35390a_get_datetime()
198 tm->tm_mon = bcd2bin(buf[S35390A_BYTE_MONTH]) - 1; s35390a_get_datetime()
199 tm->tm_year = bcd2bin(buf[S35390A_BYTE_YEAR]) + 100; s35390a_get_datetime()
285 alm->time.tm_wday = bcd2bin(buf[S35390A_ALRM_BYTE_WDAY]); s35390a_read_alarm()
288 alm->time.tm_min = bcd2bin(buf[S35390A_ALRM_BYTE_MINS]); s35390a_read_alarm()
H A Drtc-m48t59.c80 tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); m48t59_rtc_read_time()
82 tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; m48t59_rtc_read_time()
83 tm->tm_mday = bcd2bin(M48T59_READ(M48T59_MDAY)); m48t59_rtc_read_time()
96 tm->tm_wday = bcd2bin(val & 0x07); m48t59_rtc_read_time()
97 tm->tm_hour = bcd2bin(M48T59_READ(M48T59_HOUR) & 0x3F); m48t59_rtc_read_time()
98 tm->tm_min = bcd2bin(M48T59_READ(M48T59_MIN) & 0x7F); m48t59_rtc_read_time()
99 tm->tm_sec = bcd2bin(M48T59_READ(M48T59_SEC) & 0x7F); m48t59_rtc_read_time()
175 tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); m48t59_rtc_readalarm()
181 tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; m48t59_rtc_readalarm()
187 tm->tm_mday = bcd2bin(M48T59_READ(M48T59_ALARM_DATE)); m48t59_rtc_readalarm()
188 tm->tm_hour = bcd2bin(M48T59_READ(M48T59_ALARM_HOUR)); m48t59_rtc_readalarm()
189 tm->tm_min = bcd2bin(M48T59_READ(M48T59_ALARM_MIN)); m48t59_rtc_readalarm()
190 tm->tm_sec = bcd2bin(M48T59_READ(M48T59_ALARM_SEC)); m48t59_rtc_readalarm()
H A Drtc-bq32k.c96 tm->tm_sec = bcd2bin(regs.seconds & BQ32K_SECONDS_MASK); bq32k_rtc_read_time()
97 tm->tm_min = bcd2bin(regs.minutes & BQ32K_SECONDS_MASK); bq32k_rtc_read_time()
98 tm->tm_hour = bcd2bin(regs.cent_hours & BQ32K_HOURS_MASK); bq32k_rtc_read_time()
99 tm->tm_mday = bcd2bin(regs.date); bq32k_rtc_read_time()
100 tm->tm_wday = bcd2bin(regs.day) - 1; bq32k_rtc_read_time()
101 tm->tm_mon = bcd2bin(regs.month) - 1; bq32k_rtc_read_time()
102 tm->tm_year = bcd2bin(regs.years) + bq32k_rtc_read_time()
H A Drtc-opal.c35 tm->tm_year = ((bcd2bin(y_m_d >> 24) * 100) + opal_to_tm()
36 bcd2bin((y_m_d >> 16) & 0xff)) - 1900; opal_to_tm()
37 tm->tm_mon = bcd2bin((y_m_d >> 8) & 0xff) - 1; opal_to_tm()
38 tm->tm_mday = bcd2bin(y_m_d & 0xff); opal_to_tm()
39 tm->tm_hour = bcd2bin((h_m_s_ms >> 56) & 0xff); opal_to_tm()
40 tm->tm_min = bcd2bin((h_m_s_ms >> 48) & 0xff); opal_to_tm()
41 tm->tm_sec = bcd2bin((h_m_s_ms >> 40) & 0xff); opal_to_tm()
H A Drtc-pcf50633.c69 rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); pcf2rtc_time()
70 rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); pcf2rtc_time()
71 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); pcf2rtc_time()
72 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); pcf2rtc_time()
73 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); pcf2rtc_time()
74 rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; pcf2rtc_time()
75 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; pcf2rtc_time()
H A Drtc-rs5c313.c240 tm->tm_sec = bcd2bin(data); rs5c313_rtc_read_time()
244 tm->tm_min = bcd2bin(data); rs5c313_rtc_read_time()
248 tm->tm_hour = bcd2bin(data); rs5c313_rtc_read_time()
252 tm->tm_mday = bcd2bin(data); rs5c313_rtc_read_time()
256 tm->tm_mon = bcd2bin(data) - 1; rs5c313_rtc_read_time()
260 tm->tm_year = bcd2bin(data); rs5c313_rtc_read_time()
266 tm->tm_wday = bcd2bin(data); rs5c313_rtc_read_time()
H A Drtc-rs5c348.c121 tm->tm_sec = bcd2bin(rxbuf[RS5C348_REG_SECS] & RS5C348_SECS_MASK); rs5c348_rtc_read_time()
122 tm->tm_min = bcd2bin(rxbuf[RS5C348_REG_MINS] & RS5C348_MINS_MASK); rs5c348_rtc_read_time()
123 tm->tm_hour = bcd2bin(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK); rs5c348_rtc_read_time()
132 tm->tm_wday = bcd2bin(rxbuf[RS5C348_REG_WDAY] & RS5C348_WDAY_MASK); rs5c348_rtc_read_time()
133 tm->tm_mday = bcd2bin(rxbuf[RS5C348_REG_DAY] & RS5C348_DAY_MASK); rs5c348_rtc_read_time()
135 bcd2bin(rxbuf[RS5C348_REG_MONTH] & RS5C348_MONTH_MASK) - 1; rs5c348_rtc_read_time()
137 tm->tm_year = bcd2bin(rxbuf[RS5C348_REG_YEAR]) + rs5c348_rtc_read_time()
H A Drtc-v3020.c241 dt->tm_sec = bcd2bin(tmp); v3020_read_time()
243 dt->tm_min = bcd2bin(tmp); v3020_read_time()
245 dt->tm_hour = bcd2bin(tmp); v3020_read_time()
247 dt->tm_mday = bcd2bin(tmp); v3020_read_time()
249 dt->tm_mon = bcd2bin(tmp) - 1; v3020_read_time()
251 dt->tm_wday = bcd2bin(tmp); v3020_read_time()
253 dt->tm_year = bcd2bin(tmp)+100; v3020_read_time()
H A Drtc-twl.c304 tm->tm_sec = bcd2bin(rtc_data[0]); twl_rtc_read_time()
305 tm->tm_min = bcd2bin(rtc_data[1]); twl_rtc_read_time()
306 tm->tm_hour = bcd2bin(rtc_data[2]); twl_rtc_read_time()
307 tm->tm_mday = bcd2bin(rtc_data[3]); twl_rtc_read_time()
308 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; twl_rtc_read_time()
309 tm->tm_year = bcd2bin(rtc_data[5]) + 100; twl_rtc_read_time()
369 alm->time.tm_sec = bcd2bin(rtc_data[0]); twl_rtc_read_alarm()
370 alm->time.tm_min = bcd2bin(rtc_data[1]); twl_rtc_read_alarm()
371 alm->time.tm_hour = bcd2bin(rtc_data[2]); twl_rtc_read_alarm()
372 alm->time.tm_mday = bcd2bin(rtc_data[3]); twl_rtc_read_alarm()
373 alm->time.tm_mon = bcd2bin(rtc_data[4]) - 1; twl_rtc_read_alarm()
374 alm->time.tm_year = bcd2bin(rtc_data[5]) + 100; twl_rtc_read_alarm()
H A Drtc-hym8563.c113 tm->tm_sec = bcd2bin(buf[0] & HYM8563_SEC_MASK); hym8563_rtc_read_time()
114 tm->tm_min = bcd2bin(buf[1] & HYM8563_MIN_MASK); hym8563_rtc_read_time()
115 tm->tm_hour = bcd2bin(buf[2] & HYM8563_HOUR_MASK); hym8563_rtc_read_time()
116 tm->tm_mday = bcd2bin(buf[3] & HYM8563_DAY_MASK); hym8563_rtc_read_time()
117 tm->tm_wday = bcd2bin(buf[4] & HYM8563_WEEKDAY_MASK); /* 0 = Sun */ hym8563_rtc_read_time()
118 tm->tm_mon = bcd2bin(buf[5] & HYM8563_MONTH_MASK) - 1; /* 0 = Jan */ hym8563_rtc_read_time()
119 tm->tm_year = bcd2bin(buf[6]) + 100; hym8563_rtc_read_time()
205 bcd2bin(buf[0] & HYM8563_MIN_MASK); hym8563_rtc_read_alarm()
208 bcd2bin(buf[1] & HYM8563_HOUR_MASK); hym8563_rtc_read_alarm()
211 bcd2bin(buf[2] & HYM8563_DAY_MASK); hym8563_rtc_read_alarm()
214 bcd2bin(buf[3] & HYM8563_WEEKDAY_MASK); hym8563_rtc_read_alarm()
H A Drtc-ds1286.c197 tm->tm_sec = bcd2bin(tm->tm_sec); ds1286_read_time()
198 tm->tm_min = bcd2bin(tm->tm_min); ds1286_read_time()
199 tm->tm_hour = bcd2bin(tm->tm_hour); ds1286_read_time()
200 tm->tm_mday = bcd2bin(tm->tm_mday); ds1286_read_time()
201 tm->tm_mon = bcd2bin(tm->tm_mon); ds1286_read_time()
202 tm->tm_year = bcd2bin(tm->tm_year); ds1286_read_time()
284 alm->time.tm_min = bcd2bin(alm->time.tm_min); ds1286_read_alarm()
285 alm->time.tm_hour = bcd2bin(alm->time.tm_hour); ds1286_read_alarm()
H A Drtc-ds1553.c123 tm->tm_sec = bcd2bin(second); ds1553_rtc_read_time()
124 tm->tm_min = bcd2bin(minute); ds1553_rtc_read_time()
125 tm->tm_hour = bcd2bin(hour); ds1553_rtc_read_time()
126 tm->tm_mday = bcd2bin(day); ds1553_rtc_read_time()
127 tm->tm_wday = bcd2bin(week); ds1553_rtc_read_time()
128 tm->tm_mon = bcd2bin(month) - 1; ds1553_rtc_read_time()
130 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; ds1553_rtc_read_time()
H A Drtc-stk17ta8.c125 tm->tm_sec = bcd2bin(second); stk17ta8_rtc_read_time()
126 tm->tm_min = bcd2bin(minute); stk17ta8_rtc_read_time()
127 tm->tm_hour = bcd2bin(hour); stk17ta8_rtc_read_time()
128 tm->tm_mday = bcd2bin(day); stk17ta8_rtc_read_time()
129 tm->tm_wday = bcd2bin(week); stk17ta8_rtc_read_time()
130 tm->tm_mon = bcd2bin(month) - 1; stk17ta8_rtc_read_time()
132 tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; stk17ta8_rtc_read_time()
H A Drtc-abx80x.c108 tm->tm_sec = bcd2bin(buf[ABX8XX_REG_SC] & 0x7F); abx80x_rtc_read_time()
109 tm->tm_min = bcd2bin(buf[ABX8XX_REG_MN] & 0x7F); abx80x_rtc_read_time()
110 tm->tm_hour = bcd2bin(buf[ABX8XX_REG_HR] & 0x3F); abx80x_rtc_read_time()
112 tm->tm_mday = bcd2bin(buf[ABX8XX_REG_DA] & 0x3F); abx80x_rtc_read_time()
113 tm->tm_mon = bcd2bin(buf[ABX8XX_REG_MO] & 0x1F) - 1; abx80x_rtc_read_time()
114 tm->tm_year = bcd2bin(buf[ABX8XX_REG_YR]) + 100; abx80x_rtc_read_time()
H A Drtc-as3722.c54 tm->tm_sec = bcd2bin(rbuff[0] & 0x7F); as3722_reg_to_time()
55 tm->tm_min = bcd2bin(rbuff[1] & 0x7F); as3722_reg_to_time()
56 tm->tm_hour = bcd2bin(rbuff[2] & 0x3F); as3722_reg_to_time()
57 tm->tm_mday = bcd2bin(rbuff[3] & 0x3F); as3722_reg_to_time()
58 tm->tm_mon = bcd2bin(rbuff[4] & 0x1F); as3722_reg_to_time()
59 tm->tm_year = (AS3722_RTC_START_YEAR - 1900) + bcd2bin(rbuff[5] & 0x7F); as3722_reg_to_time()
H A Drtc-isl12022.c140 tm->tm_sec = bcd2bin(buf[ISL12022_REG_SC] & 0x7F); isl12022_get_datetime()
141 tm->tm_min = bcd2bin(buf[ISL12022_REG_MN] & 0x7F); isl12022_get_datetime()
142 tm->tm_hour = bcd2bin(buf[ISL12022_REG_HR] & 0x3F); isl12022_get_datetime()
143 tm->tm_mday = bcd2bin(buf[ISL12022_REG_DT] & 0x3F); isl12022_get_datetime()
145 tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1; isl12022_get_datetime()
146 tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100; isl12022_get_datetime()
H A Drtc-nuc900.c108 tm->tm_mday = bcd2bin(calreg >> 0); nuc900_rtc_bcd2bin()
109 tm->tm_mon = bcd2bin(calreg >> 8); nuc900_rtc_bcd2bin()
110 tm->tm_year = bcd2bin(calreg >> 16) + 100; nuc900_rtc_bcd2bin()
112 tm->tm_sec = bcd2bin(timereg >> 0); nuc900_rtc_bcd2bin()
113 tm->tm_min = bcd2bin(timereg >> 8); nuc900_rtc_bcd2bin()
114 tm->tm_hour = bcd2bin(timereg >> 16); nuc900_rtc_bcd2bin()
H A Drtc-pcf2123.c152 tm->tm_sec = bcd2bin(rxbuf[0] & 0x7F); pcf2123_rtc_read_time()
153 tm->tm_min = bcd2bin(rxbuf[1] & 0x7F); pcf2123_rtc_read_time()
154 tm->tm_hour = bcd2bin(rxbuf[2] & 0x3F); /* rtc hr 0-23 */ pcf2123_rtc_read_time()
155 tm->tm_mday = bcd2bin(rxbuf[3] & 0x3F); pcf2123_rtc_read_time()
157 tm->tm_mon = bcd2bin(rxbuf[5] & 0x1F) - 1; /* rtc mn 1-12 */ pcf2123_rtc_read_time()
158 tm->tm_year = bcd2bin(rxbuf[6]); pcf2123_rtc_read_time()
H A Drtc-pcf2127.c75 tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); pcf2127_get_datetime()
76 tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); pcf2127_get_datetime()
77 tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); /* rtc hr 0-23 */ pcf2127_get_datetime()
78 tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); pcf2127_get_datetime()
80 tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ pcf2127_get_datetime()
81 tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]); pcf2127_get_datetime()
H A Drtc-pcf8523.c204 tm->tm_sec = bcd2bin(regs[0] & 0x7f); pcf8523_rtc_read_time()
205 tm->tm_min = bcd2bin(regs[1] & 0x7f); pcf8523_rtc_read_time()
206 tm->tm_hour = bcd2bin(regs[2] & 0x3f); pcf8523_rtc_read_time()
207 tm->tm_mday = bcd2bin(regs[3] & 0x3f); pcf8523_rtc_read_time()
209 tm->tm_mon = bcd2bin(regs[5] & 0x1f) - 1; pcf8523_rtc_read_time()
210 tm->tm_year = bcd2bin(regs[6]) + 100; pcf8523_rtc_read_time()
H A Drtc-rx4581.c158 tm->tm_sec = bcd2bin(date[RX4581_REG_SC] & 0x7F); rx4581_get_datetime()
159 tm->tm_min = bcd2bin(date[RX4581_REG_MN] & 0x7F); rx4581_get_datetime()
160 tm->tm_hour = bcd2bin(date[RX4581_REG_HR] & 0x3F); /* rtc hr 0-23 */ rx4581_get_datetime()
162 tm->tm_mday = bcd2bin(date[RX4581_REG_DM] & 0x3F); rx4581_get_datetime()
163 tm->tm_mon = bcd2bin(date[RX4581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ rx4581_get_datetime()
164 tm->tm_year = bcd2bin(date[RX4581_REG_YR]); rx4581_get_datetime()
H A Drtc-pcf8563.c218 tm->tm_sec = bcd2bin(buf[PCF8563_REG_SC] & 0x7F); pcf8563_get_datetime()
219 tm->tm_min = bcd2bin(buf[PCF8563_REG_MN] & 0x7F); pcf8563_get_datetime()
220 tm->tm_hour = bcd2bin(buf[PCF8563_REG_HR] & 0x3F); /* rtc hr 0-23 */ pcf8563_get_datetime()
221 tm->tm_mday = bcd2bin(buf[PCF8563_REG_DM] & 0x3F); pcf8563_get_datetime()
223 tm->tm_mon = bcd2bin(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ pcf8563_get_datetime()
224 tm->tm_year = bcd2bin(buf[PCF8563_REG_YR]); pcf8563_get_datetime()
340 tm->time.tm_min = bcd2bin(buf[0] & 0x7F); pcf8563_rtc_read_alarm()
341 tm->time.tm_hour = bcd2bin(buf[1] & 0x3F); pcf8563_rtc_read_alarm()
342 tm->time.tm_mday = bcd2bin(buf[2] & 0x3F); pcf8563_rtc_read_alarm()
343 tm->time.tm_wday = bcd2bin(buf[3] & 0x7); pcf8563_rtc_read_alarm()
H A Drtc-rx8025.c206 dt->tm_sec = bcd2bin(date[RX8025_REG_SEC] & 0x7f); rx8025_get_time()
207 dt->tm_min = bcd2bin(date[RX8025_REG_MIN] & 0x7f); rx8025_get_time()
209 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x3f); rx8025_get_time()
211 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x1f) % 12 rx8025_get_time()
214 dt->tm_mday = bcd2bin(date[RX8025_REG_MDAY] & 0x3f); rx8025_get_time()
215 dt->tm_mon = bcd2bin(date[RX8025_REG_MONTH] & 0x1f) - 1; rx8025_get_time()
216 dt->tm_year = bcd2bin(date[RX8025_REG_YEAR]); rx8025_get_time()
341 t->time.tm_min = bcd2bin(ald[0] & 0x7f); rx8025_read_alarm()
343 t->time.tm_hour = bcd2bin(ald[1] & 0x3f); rx8025_read_alarm()
345 t->time.tm_hour = bcd2bin(ald[1] & 0x1f) % 12 rx8025_read_alarm()
H A Drtc-pcf8583.c80 dt->tm_sec = bcd2bin(buf[1]); pcf8583_get_datetime()
81 dt->tm_min = bcd2bin(buf[2]); pcf8583_get_datetime()
82 dt->tm_hour = bcd2bin(buf[3]); pcf8583_get_datetime()
83 dt->tm_mday = bcd2bin(buf[4]); pcf8583_get_datetime()
84 dt->tm_mon = bcd2bin(buf[5]) - 1; pcf8583_get_datetime()
H A Drtc-ds1307.c387 t->tm_sec = bcd2bin(ds1307->regs[DS1307_REG_SECS] & 0x7f); ds1307_get_time()
388 t->tm_min = bcd2bin(ds1307->regs[DS1307_REG_MIN] & 0x7f); ds1307_get_time()
390 t->tm_hour = bcd2bin(tmp); ds1307_get_time()
391 t->tm_wday = bcd2bin(ds1307->regs[DS1307_REG_WDAY] & 0x07) - 1; ds1307_get_time()
392 t->tm_mday = bcd2bin(ds1307->regs[DS1307_REG_MDAY] & 0x3f); ds1307_get_time()
394 t->tm_mon = bcd2bin(tmp) - 1; ds1307_get_time()
397 t->tm_year = bcd2bin(ds1307->regs[DS1307_REG_YEAR]) + 100; ds1307_get_time()
496 t->time.tm_sec = bcd2bin(ds1307->regs[0] & 0x7f); ds1337_read_alarm()
497 t->time.tm_min = bcd2bin(ds1307->regs[1] & 0x7f); ds1337_read_alarm()
498 t->time.tm_hour = bcd2bin(ds1307->regs[2] & 0x3f); ds1337_read_alarm()
499 t->time.tm_mday = bcd2bin(ds1307->regs[3] & 0x3f); ds1337_read_alarm()
691 t->time.tm_sec = bcd2bin(ds1307->regs[3] & 0x7f); mcp794xx_read_alarm()
692 t->time.tm_min = bcd2bin(ds1307->regs[4] & 0x7f); mcp794xx_read_alarm()
693 t->time.tm_hour = bcd2bin(ds1307->regs[5] & 0x3f); mcp794xx_read_alarm()
694 t->time.tm_wday = bcd2bin(ds1307->regs[6] & 0x7) - 1; mcp794xx_read_alarm()
695 t->time.tm_mday = bcd2bin(ds1307->regs[7] & 0x3f); mcp794xx_read_alarm()
696 t->time.tm_mon = bcd2bin(ds1307->regs[8] & 0x1f) - 1; mcp794xx_read_alarm()
1039 hour = bcd2bin(ds1307->regs[DS1307_REG_HOUR]); ds1307_probe()
1161 tmp = bcd2bin(tmp & 0x1f); ds1307_probe()
H A Drtc-isl12057.c90 tm->tm_sec = bcd2bin(regs[ISL12057_REG_RTC_SC]); isl12057_rtc_regs_to_tm()
91 tm->tm_min = bcd2bin(regs[ISL12057_REG_RTC_MN]); isl12057_rtc_regs_to_tm()
94 tm->tm_hour = bcd2bin(regs[ISL12057_REG_RTC_HR] & 0x1f); isl12057_rtc_regs_to_tm()
98 tm->tm_hour = bcd2bin(regs[ISL12057_REG_RTC_HR] & 0x3f); isl12057_rtc_regs_to_tm()
101 tm->tm_mday = bcd2bin(regs[ISL12057_REG_RTC_DT]); isl12057_rtc_regs_to_tm()
102 tm->tm_wday = bcd2bin(regs[ISL12057_REG_RTC_DW]) - 1; /* starts at 1 */ isl12057_rtc_regs_to_tm()
103 tm->tm_mon = bcd2bin(regs[ISL12057_REG_RTC_MO] & 0x1f) - 1; /* ditto */ isl12057_rtc_regs_to_tm()
104 tm->tm_year = bcd2bin(regs[ISL12057_REG_RTC_YR]) + 100; isl12057_rtc_regs_to_tm()
263 alarm_tm->tm_sec = bcd2bin(regs[0] & 0x7f); isl12057_rtc_read_alarm()
264 alarm_tm->tm_min = bcd2bin(regs[1] & 0x7f); isl12057_rtc_read_alarm()
265 alarm_tm->tm_hour = bcd2bin(regs[2] & 0x3f); isl12057_rtc_read_alarm()
266 alarm_tm->tm_mday = bcd2bin(regs[3] & 0x3f); isl12057_rtc_read_alarm()
H A Drtc-s3c.c188 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); s3c_rtc_gettime()
189 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); s3c_rtc_gettime()
190 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); s3c_rtc_gettime()
191 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); s3c_rtc_gettime()
192 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); s3c_rtc_gettime()
193 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); s3c_rtc_gettime()
266 alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec); s3c_rtc_getalarm()
271 alm_tm->tm_min = bcd2bin(alm_tm->tm_min); s3c_rtc_getalarm()
276 alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour); s3c_rtc_getalarm()
281 alm_tm->tm_mday = bcd2bin(alm_tm->tm_mday); s3c_rtc_getalarm()
286 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon); s3c_rtc_getalarm()
293 alm_tm->tm_year = bcd2bin(alm_tm->tm_year); s3c_rtc_getalarm()
H A Drtc-rx8581.c152 tm->tm_sec = bcd2bin(date[RX8581_REG_SC] & 0x7F); rx8581_get_datetime()
153 tm->tm_min = bcd2bin(date[RX8581_REG_MN] & 0x7F); rx8581_get_datetime()
154 tm->tm_hour = bcd2bin(date[RX8581_REG_HR] & 0x3F); /* rtc hr 0-23 */ rx8581_get_datetime()
156 tm->tm_mday = bcd2bin(date[RX8581_REG_DM] & 0x3F); rx8581_get_datetime()
157 tm->tm_mon = bcd2bin(date[RX8581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ rx8581_get_datetime()
158 tm->tm_year = bcd2bin(date[RX8581_REG_YR]); rx8581_get_datetime()
H A Drtc-at91rm9200.c126 tm->tm_sec = bcd2bin((time & AT91_RTC_SEC) >> 0); at91_rtc_decodetime()
127 tm->tm_min = bcd2bin((time & AT91_RTC_MIN) >> 8); at91_rtc_decodetime()
128 tm->tm_hour = bcd2bin((time & AT91_RTC_HOUR) >> 16); at91_rtc_decodetime()
135 tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ at91_rtc_decodetime()
136 tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ at91_rtc_decodetime()
138 tm->tm_wday = bcd2bin((date & AT91_RTC_DAY) >> 21) - 1; /* day of the week [0-6], Sunday=0 */ at91_rtc_decodetime()
139 tm->tm_mon = bcd2bin((date & AT91_RTC_MONTH) >> 16) - 1; at91_rtc_decodetime()
140 tm->tm_mday = bcd2bin((date & AT91_RTC_DATE) >> 24); at91_rtc_decodetime()
H A Drtc-ds1511.c264 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); ds1511_rtc_read_time()
265 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); ds1511_rtc_read_time()
266 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); ds1511_rtc_read_time()
267 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); ds1511_rtc_read_time()
268 rtc_tm->tm_wday = bcd2bin(rtc_tm->tm_wday); ds1511_rtc_read_time()
269 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); ds1511_rtc_read_time()
270 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); ds1511_rtc_read_time()
271 century = bcd2bin(century) * 100; ds1511_rtc_read_time()
H A Drtc-x1205.c132 tm->tm_sec = bcd2bin(buf[CCR_SEC]); x1205_get_datetime()
133 tm->tm_min = bcd2bin(buf[CCR_MIN]); x1205_get_datetime()
134 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ x1205_get_datetime()
135 tm->tm_mday = bcd2bin(buf[CCR_MDAY]); x1205_get_datetime()
136 tm->tm_mon = bcd2bin(buf[CCR_MONTH]) - 1; /* mon is 0-11 */ x1205_get_datetime()
137 tm->tm_year = bcd2bin(buf[CCR_YEAR]) x1205_get_datetime()
138 + (bcd2bin(buf[CCR_Y2K]) * 100) - 1900; x1205_get_datetime()
482 value = bcd2bin(reg & probe_limits_pattern[i].mask); x1205_validate_client()
H A Drtc-ds1343.c393 dt->tm_sec = bcd2bin(buf[0]); ds1343_read_time()
394 dt->tm_min = bcd2bin(buf[1]); ds1343_read_time()
395 dt->tm_hour = bcd2bin(buf[2] & 0x3F); ds1343_read_time()
396 dt->tm_wday = bcd2bin(buf[3]) - 1; ds1343_read_time()
397 dt->tm_mday = bcd2bin(buf[4]); ds1343_read_time()
398 dt->tm_mon = bcd2bin(buf[5] & 0x1F) - 1; ds1343_read_time()
399 dt->tm_year = bcd2bin(buf[6]) + 100; /* year offset from 1900 */ ds1343_read_time()
H A Drtc-sh.c371 tm->tm_sec = bcd2bin(readb(rtc->regbase + RSECCNT)); sh_rtc_read_time()
372 tm->tm_min = bcd2bin(readb(rtc->regbase + RMINCNT)); sh_rtc_read_time()
373 tm->tm_hour = bcd2bin(readb(rtc->regbase + RHRCNT)); sh_rtc_read_time()
374 tm->tm_wday = bcd2bin(readb(rtc->regbase + RWKCNT)); sh_rtc_read_time()
375 tm->tm_mday = bcd2bin(readb(rtc->regbase + RDAYCNT)); sh_rtc_read_time()
376 tm->tm_mon = bcd2bin(readb(rtc->regbase + RMONCNT)) - 1; sh_rtc_read_time()
380 yr100 = bcd2bin(yr >> 8); sh_rtc_read_time()
384 yr100 = bcd2bin((yr == 0x99) ? 0x19 : 0x20); sh_rtc_read_time()
387 tm->tm_year = (yr100 * 100 + bcd2bin(yr)) - 1900; sh_rtc_read_time()
463 value = bcd2bin(byte); sh_rtc_read_alarm_value()
H A Drtc-ds1305.c119 hour += bcd2bin(bcd); bcd2hour()
122 return bcd2bin(bcd); bcd2hour()
194 time->tm_sec = bcd2bin(buf[DS1305_SEC]); ds1305_get_time()
195 time->tm_min = bcd2bin(buf[DS1305_MIN]); ds1305_get_time()
198 time->tm_mday = bcd2bin(buf[DS1305_MDAY]); ds1305_get_time()
199 time->tm_mon = bcd2bin(buf[DS1305_MON]) - 1; ds1305_get_time()
200 time->tm_year = bcd2bin(buf[DS1305_YEAR]) + 100; ds1305_get_time()
317 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]); ds1305_get_alarm()
318 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]); ds1305_get_alarm()
H A Drtc-rs5c372.c159 return bcd2bin(reg & 0x3f); rs5c_reg2hr()
161 hour = bcd2bin(reg & 0x1f); rs5c_reg2hr()
191 tm->tm_sec = bcd2bin(rs5c->regs[RS5C372_REG_SECS] & 0x7f); rs5c372_get_datetime()
192 tm->tm_min = bcd2bin(rs5c->regs[RS5C372_REG_MINS] & 0x7f); rs5c372_get_datetime()
195 tm->tm_wday = bcd2bin(rs5c->regs[RS5C372_REG_WDAY] & 0x07); rs5c372_get_datetime()
196 tm->tm_mday = bcd2bin(rs5c->regs[RS5C372_REG_DAY] & 0x3f); rs5c372_get_datetime()
199 tm->tm_mon = bcd2bin(rs5c->regs[RS5C372_REG_MONTH] & 0x1f) - 1; rs5c372_get_datetime()
202 tm->tm_year = bcd2bin(rs5c->regs[RS5C372_REG_YEAR]) + 100; rs5c372_get_datetime()
345 t->time.tm_min = bcd2bin(rs5c->regs[RS5C_REG_ALARM_A_MIN] & 0x7f); rs5c_read_alarm()
H A Drtc-spear.c189 tm->tm_sec = bcd2bin(tm->tm_sec); bcd2tm()
190 tm->tm_min = bcd2bin(tm->tm_min); bcd2tm()
191 tm->tm_hour = bcd2bin(tm->tm_hour); bcd2tm()
192 tm->tm_mday = bcd2bin(tm->tm_mday); bcd2tm()
193 tm->tm_mon = bcd2bin(tm->tm_mon) - 1; bcd2tm()
195 tm->tm_year = bcd2bin(tm->tm_year); bcd2tm()
H A Drtc-s5m.c284 tm->tm_sec = bcd2bin(data[RTC_SEC]); s5m8763_data_to_tm()
285 tm->tm_min = bcd2bin(data[RTC_MIN]); s5m8763_data_to_tm()
288 tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f); s5m8763_data_to_tm()
292 tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f); s5m8763_data_to_tm()
296 tm->tm_mday = bcd2bin(data[RTC_DATE]); s5m8763_data_to_tm()
297 tm->tm_mon = bcd2bin(data[RTC_MONTH]); s5m8763_data_to_tm()
298 tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100; s5m8763_data_to_tm()
H A Drtc-davinci.c296 tm->tm_sec = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_SEC)); davinci_rtc_read_time()
299 tm->tm_min = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_MIN)); davinci_rtc_read_time()
302 tm->tm_hour = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_HOUR)); davinci_rtc_read_time()
394 alm->time.tm_min = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AMIN)); davinci_rtc_read_alarm()
397 alm->time.tm_hour = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AHOUR)); davinci_rtc_read_alarm()
H A Drtc-ab-b5ze-s3.c242 tm->tm_sec = bcd2bin(regs[ABB5ZES3_REG_RTC_SC] & 0x7F); _abb5zes3_rtc_read_time()
243 tm->tm_min = bcd2bin(regs[ABB5ZES3_REG_RTC_MN]); _abb5zes3_rtc_read_time()
246 tm->tm_hour = bcd2bin(regs[ABB5ZES3_REG_RTC_HR] & 0x1f); _abb5zes3_rtc_read_time()
250 tm->tm_hour = bcd2bin(regs[ABB5ZES3_REG_RTC_HR]); _abb5zes3_rtc_read_time()
253 tm->tm_mday = bcd2bin(regs[ABB5ZES3_REG_RTC_DT]); _abb5zes3_rtc_read_time()
254 tm->tm_wday = bcd2bin(regs[ABB5ZES3_REG_RTC_DW]); _abb5zes3_rtc_read_time()
255 tm->tm_mon = bcd2bin(regs[ABB5ZES3_REG_RTC_MO]) - 1; /* starts at 1 */ _abb5zes3_rtc_read_time()
256 tm->tm_year = bcd2bin(regs[ABB5ZES3_REG_RTC_YR]) + 100; _abb5zes3_rtc_read_time()
400 alarm_tm->tm_min = bcd2bin(regs[0] & 0x7f); _abb5zes3_rtc_read_alarm()
401 alarm_tm->tm_hour = bcd2bin(regs[1] & 0x3f); _abb5zes3_rtc_read_alarm()
402 alarm_tm->tm_mday = bcd2bin(regs[2] & 0x3f); _abb5zes3_rtc_read_alarm()
H A Drtc-m41t80.c117 tm->tm_sec = bcd2bin(buf[M41T80_REG_SEC] & 0x7f); m41t80_get_datetime()
118 tm->tm_min = bcd2bin(buf[M41T80_REG_MIN] & 0x7f); m41t80_get_datetime()
119 tm->tm_hour = bcd2bin(buf[M41T80_REG_HOUR] & 0x3f); m41t80_get_datetime()
120 tm->tm_mday = bcd2bin(buf[M41T80_REG_DAY] & 0x3f); m41t80_get_datetime()
122 tm->tm_mon = bcd2bin(buf[M41T80_REG_MON] & 0x1f) - 1; m41t80_get_datetime()
125 tm->tm_year = bcd2bin(buf[M41T80_REG_YEAR]) + 100; m41t80_get_datetime()
H A Drtc-omap.c279 tm->tm_sec = bcd2bin(tm->tm_sec); bcd2tm()
280 tm->tm_min = bcd2bin(tm->tm_min); bcd2tm()
281 tm->tm_hour = bcd2bin(tm->tm_hour); bcd2tm()
282 tm->tm_mday = bcd2bin(tm->tm_mday); bcd2tm()
283 tm->tm_mon = bcd2bin(tm->tm_mon) - 1; bcd2tm()
285 tm->tm_year = bcd2bin(tm->tm_year) + 100; bcd2tm()
H A Drtc-cmos.c249 t->time.tm_sec = bcd2bin(t->time.tm_sec); cmos_read_alarm()
253 t->time.tm_min = bcd2bin(t->time.tm_min); cmos_read_alarm()
257 t->time.tm_hour = bcd2bin(t->time.tm_hour); cmos_read_alarm()
263 t->time.tm_mday = bcd2bin(t->time.tm_mday); cmos_read_alarm()
269 t->time.tm_mon = bcd2bin(t->time.tm_mon)-1; cmos_read_alarm()
H A Drtc-pl031.c155 tm->tm_year = bcd2bin(bcd_year) + (bcd2bin(bcd_year >> 8) * 100); pl031_stv2_time_to_tm()
H A Drtc-ds1685.c72 * ds1685_rtc_bcd2bin - bcd2bin wrapper in case platform doesn't support BCD.
84 return (bcd2bin(val) & bcd_mask); ds1685_rtc_bcd2bin()
270 /* bcd2bin if needed, perform fixups, and store to rtc_time. */ ds1685_rtc_read_time()
/linux-4.1.27/arch/mips/include/asm/
H A Dmc146818-time.h47 cmos_minutes = bcd2bin(cmos_minutes); mc146818_set_rtc_mmss()
106 sec = bcd2bin(sec); mc146818_get_cmos_time()
107 min = bcd2bin(min); mc146818_get_cmos_time()
108 hour = bcd2bin(hour); mc146818_get_cmos_time()
109 day = bcd2bin(day); mc146818_get_cmos_time()
110 mon = bcd2bin(mon); mc146818_get_cmos_time()
111 year = bcd2bin(year); mc146818_get_cmos_time()
/linux-4.1.27/arch/m68k/mvme16x/
H A Drtc.c51 wtime.tm_sec = bcd2bin(rtc->bcd_sec); rtc_ioctl()
52 wtime.tm_min = bcd2bin(rtc->bcd_min); rtc_ioctl()
53 wtime.tm_hour = bcd2bin(rtc->bcd_hr); rtc_ioctl()
54 wtime.tm_mday = bcd2bin(rtc->bcd_dom); rtc_ioctl()
55 wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; rtc_ioctl()
56 wtime.tm_year = bcd2bin(rtc->bcd_year); rtc_ioctl()
59 wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; rtc_ioctl()
/linux-4.1.27/arch/powerpc/platforms/chrp/
H A Dtime.c143 sec = bcd2bin(sec); chrp_get_rtc_time()
144 min = bcd2bin(min); chrp_get_rtc_time()
145 hour = bcd2bin(hour); chrp_get_rtc_time()
146 day = bcd2bin(day); chrp_get_rtc_time()
147 mon = bcd2bin(mon); chrp_get_rtc_time()
148 year = bcd2bin(year); chrp_get_rtc_time()
/linux-4.1.27/arch/m68k/bvme6000/
H A Drtc.c55 wtime.tm_sec = bcd2bin(rtc->bcd_sec); rtc_ioctl()
56 wtime.tm_min = bcd2bin(rtc->bcd_min); rtc_ioctl()
57 wtime.tm_hour = bcd2bin(rtc->bcd_hr); rtc_ioctl()
58 wtime.tm_mday = bcd2bin(rtc->bcd_dom); rtc_ioctl()
59 wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; rtc_ioctl()
60 wtime.tm_year = bcd2bin(rtc->bcd_year); rtc_ioctl()
63 wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; rtc_ioctl()
64 } while (wtime.tm_sec != bcd2bin(rtc->bcd_sec)); rtc_ioctl()
H A Dconfig.c293 t->tm_sec = bcd2bin(rtc->bcd_sec); bvme6000_hwclk()
294 t->tm_min = bcd2bin(rtc->bcd_min); bvme6000_hwclk()
295 t->tm_hour = bcd2bin(rtc->bcd_hr); bvme6000_hwclk()
296 t->tm_mday = bcd2bin(rtc->bcd_dom); bvme6000_hwclk()
297 t->tm_mon = bcd2bin(rtc->bcd_mth)-1; bvme6000_hwclk()
298 t->tm_year = bcd2bin(rtc->bcd_year); bvme6000_hwclk()
301 t->tm_wday = bcd2bin(rtc->bcd_dow)-1; bvme6000_hwclk()
302 } while (t->tm_sec != bcd2bin(rtc->bcd_sec)); bvme6000_hwclk()
328 rtc_minutes = bcd2bin (rtc->bcd_min); bvme6000_set_clock_mmss()
/linux-4.1.27/arch/sh/boards/mach-sdk7786/
H A Dfpga.c69 bcd2bin(version >> 8) & 0xf, bcd2bin(version & 0xf), sdk7786_fpga_init()
71 (date >> 8) & 0xf, bcd2bin(date & 0xff)); sdk7786_fpga_init()
/linux-4.1.27/arch/x86/kernel/
H A Drtc.c97 sec = bcd2bin(sec); mach_get_cmos_time()
98 min = bcd2bin(min); mach_get_cmos_time()
99 hour = bcd2bin(hour); mach_get_cmos_time()
100 day = bcd2bin(day); mach_get_cmos_time()
101 mon = bcd2bin(mon); mach_get_cmos_time()
102 year = bcd2bin(year); mach_get_cmos_time()
106 century = bcd2bin(century); mach_get_cmos_time()
/linux-4.1.27/arch/mips/dec/
H A Dtime.c46 sec = bcd2bin(sec); read_persistent_clock()
47 min = bcd2bin(min); read_persistent_clock()
48 hour = bcd2bin(hour); read_persistent_clock()
49 day = bcd2bin(day); read_persistent_clock()
50 mon = bcd2bin(mon); read_persistent_clock()
51 year = bcd2bin(year); read_persistent_clock()
85 cmos_minutes = bcd2bin(cmos_minutes); rtc_mips_set_mmss()
/linux-4.1.27/arch/mips/sibyte/swarm/
H A Drtc_xicor1241.c194 sec = bcd2bin(sec); xicor_get_time()
195 min = bcd2bin(min); xicor_get_time()
196 hour = bcd2bin(hour); xicor_get_time()
197 day = bcd2bin(day); xicor_get_time()
198 mon = bcd2bin(mon); xicor_get_time()
199 year = bcd2bin(year); xicor_get_time()
200 y2k = bcd2bin(y2k); xicor_get_time()
H A Drtc_m41t81.c212 sec = bcd2bin(sec); m41t81_get_time()
213 min = bcd2bin(min); m41t81_get_time()
214 hour = bcd2bin(hour); m41t81_get_time()
215 day = bcd2bin(day); m41t81_get_time()
216 mon = bcd2bin(mon); m41t81_get_time()
217 year = bcd2bin(year); m41t81_get_time()
/linux-4.1.27/arch/powerpc/platforms/maple/
H A Dtime.c70 tm->tm_sec = bcd2bin(tm->tm_sec); maple_get_rtc_time()
71 tm->tm_min = bcd2bin(tm->tm_min); maple_get_rtc_time()
72 tm->tm_hour = bcd2bin(tm->tm_hour); maple_get_rtc_time()
73 tm->tm_mday = bcd2bin(tm->tm_mday); maple_get_rtc_time()
74 tm->tm_mon = bcd2bin(tm->tm_mon); maple_get_rtc_time()
75 tm->tm_year = bcd2bin(tm->tm_year); maple_get_rtc_time()
/linux-4.1.27/include/asm-generic/
H A Drtc.h87 time->tm_sec = bcd2bin(time->tm_sec); __get_rtc_time()
88 time->tm_min = bcd2bin(time->tm_min); __get_rtc_time()
89 time->tm_hour = bcd2bin(time->tm_hour); __get_rtc_time()
90 time->tm_mday = bcd2bin(time->tm_mday); __get_rtc_time()
91 time->tm_mon = bcd2bin(time->tm_mon); __get_rtc_time()
92 time->tm_year = bcd2bin(time->tm_year); __get_rtc_time()
/linux-4.1.27/arch/m68k/q40/
H A Dconfig.c248 t->tm_year = bcd2bin (Q40_RTC_YEAR); q40_hwclk()
249 t->tm_mon = bcd2bin (Q40_RTC_MNTH)-1; q40_hwclk()
250 t->tm_mday = bcd2bin (Q40_RTC_DATE); q40_hwclk()
251 t->tm_hour = bcd2bin (Q40_RTC_HOUR); q40_hwclk()
252 t->tm_min = bcd2bin (Q40_RTC_MINS); q40_hwclk()
253 t->tm_sec = bcd2bin (Q40_RTC_SECS); q40_hwclk()
259 t->tm_wday = bcd2bin(Q40_RTC_DOW)-1; q40_hwclk()
267 return bcd2bin(Q40_RTC_SECS); q40_get_ss()
282 rtc_minutes = bcd2bin(Q40_RTC_MINS); q40_set_clock_mmss()
/linux-4.1.27/arch/m68k/atari/
H A Dtime.c260 sec = bcd2bin(sec); atari_tt_hwclk()
261 min = bcd2bin(min); atari_tt_hwclk()
262 hour = bcd2bin(hour); atari_tt_hwclk()
263 day = bcd2bin(day); atari_tt_hwclk()
264 mon = bcd2bin(mon); atari_tt_hwclk()
265 year = bcd2bin(year); atari_tt_hwclk()
266 wday = bcd2bin(wday); atari_tt_hwclk()
326 rtc_minutes = bcd2bin(rtc_minutes); atari_tt_set_clock_mmss()
/linux-4.1.27/drivers/scsi/
H A Dsr_vendor.c228 min = bcd2bin(buffer[15]); sr_cd_check()
229 sec = bcd2bin(buffer[16]); sr_cd_check()
230 frame = bcd2bin(buffer[17]); sr_cd_check()
256 min = bcd2bin(buffer[1]); sr_cd_check()
257 sec = bcd2bin(buffer[2]); sr_cd_check()
258 frame = bcd2bin(buffer[3]); sr_cd_check()
/linux-4.1.27/drivers/char/
H A Dds1302.c134 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); get_rtc_time()
135 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); get_rtc_time()
136 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); get_rtc_time()
137 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); get_rtc_time()
138 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); get_rtc_time()
139 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); get_rtc_time()
H A Drtc.c1088 year = bcd2bin(year); /* This should never happen... */ rtc_init()
1339 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); rtc_get_rtc_time()
1340 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); rtc_get_rtc_time()
1341 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); rtc_get_rtc_time()
1342 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); rtc_get_rtc_time()
1343 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); rtc_get_rtc_time()
1344 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); rtc_get_rtc_time()
1345 rtc_tm->tm_wday = bcd2bin(rtc_tm->tm_wday); rtc_get_rtc_time()
1379 alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec); get_rtc_alm_time()
1380 alm_tm->tm_min = bcd2bin(alm_tm->tm_min); get_rtc_alm_time()
1381 alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour); get_rtc_alm_time()
/linux-4.1.27/drivers/mfd/
H A Dmenelaus.c843 t->tm_sec = bcd2bin(regs[0]); menelaus_to_time()
844 t->tm_min = bcd2bin(regs[1]); menelaus_to_time()
846 t->tm_hour = bcd2bin(regs[2] & 0x1f) - 1; menelaus_to_time()
850 t->tm_hour = bcd2bin(regs[2] & 0x3f); menelaus_to_time()
851 t->tm_mday = bcd2bin(regs[3]); menelaus_to_time()
852 t->tm_mon = bcd2bin(regs[4]) - 1; menelaus_to_time()
853 t->tm_year = bcd2bin(regs[5]) + 100; menelaus_to_time()
925 t->tm_wday = bcd2bin(regs[6]); menelaus_read_time()
/linux-4.1.27/arch/alpha/kernel/
H A Drtc.c63 year = bcd2bin(year); init_rtc_epoch()
157 cmos_minutes = bcd2bin(cmos_minutes); alpha_rtc_set_mmss()
H A Dcore_marvel.c666 rtc_access.data = bcd2bin(b); __marvel_rtc_io()
/linux-4.1.27/arch/mn10300/kernel/
H A Drtc.c69 cmos_minutes = bcd2bin(cmos_minutes); set_rtc_mmss()
/linux-4.1.27/drivers/ide/
H A Dide-cd.c848 msf->minute = bcd2bin(msf->minute); msf_from_bcd()
849 msf->second = bcd2bin(msf->second); msf_from_bcd()
850 msf->frame = bcd2bin(msf->frame); msf_from_bcd()
1005 toc->hdr.first_track = bcd2bin(toc->hdr.first_track); ide_cd_read_toc()
1006 toc->hdr.last_track = bcd2bin(toc->hdr.last_track); ide_cd_read_toc()
1060 toc->hdr.first_track = bcd2bin(toc->hdr.first_track); ide_cd_read_toc()
1061 toc->hdr.last_track = bcd2bin(toc->hdr.last_track); ide_cd_read_toc()
1067 toc->ent[i].track = bcd2bin(toc->ent[i].track); ide_cd_read_toc()

Completed in 3764 milliseconds