Home
last modified time | relevance | path

Searched refs:bcd2bin (Results 1 – 25 of 29) sorted by relevance

12

/external/u-boot/drivers/rtc/
Dds1306.c82 tmp->tm_sec = bcd2bin (soft_spi_read ()); /* Read seconds */ in rtc_get()
83 tmp->tm_min = bcd2bin (soft_spi_read ()); /* Read minutes */ in rtc_get()
91 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) + 11; in rtc_get()
94 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) - 1; in rtc_get()
98 tmp->tm_hour = (bcd2bin (spi_byte & 0x3F)); in rtc_get()
102 tmp->tm_mday = bcd2bin (soft_spi_read ()); /* Read Day of the Month */ in rtc_get()
103 tmp->tm_mon = bcd2bin (soft_spi_read ()); /* Read Month */ in rtc_get()
106 tmp->tm_year = bcd2bin (soft_spi_read ()) + 2000; in rtc_get()
327 tmp->tm_sec = bcd2bin (sec & 0x7F); /* convert Seconds */ in rtc_get()
328 tmp->tm_min = bcd2bin (min & 0x7F); /* convert Minutes */ in rtc_get()
[all …]
Dds1307.c126 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
127 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
128 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
129 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
130 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get()
131 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); in rtc_get()
132 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get()
284 tm->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in ds1307_rtc_get()
285 tm->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); in ds1307_rtc_get()
286 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in ds1307_rtc_get()
[all …]
Dmax6900.c66 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
67 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
68 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
69 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
70 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get()
71 tmp->tm_year = bcd2bin (year) + bcd2bin(cent) * 100; in rtc_get()
72 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
Drx8025.c118 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
119 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
121 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
123 tmp->tm_hour = bcd2bin (hour & 0x1F) % 12 + in rtc_get()
125 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
126 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get()
127 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); in rtc_get()
128 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
Dmvrtc.c39 t->tm_sec = bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK); in __mv_rtc_get()
40 t->tm_min = bcd2bin((time >> MVRTC_MIN_SFT) & MVRTC_MIN_MSK); in __mv_rtc_get()
41 t->tm_hour = bcd2bin((time >> MVRTC_HOUR_SFT) & MVRTC_HOUR_MSK); in __mv_rtc_get()
42 t->tm_wday = bcd2bin((time >> MVRTC_DAY_SFT) & MVRTC_DAY_MSK); in __mv_rtc_get()
46 t->tm_mday = bcd2bin((date >> MVRTC_DATE_SFT) & MVRTC_DATE_MSK); in __mv_rtc_get()
47 t->tm_mon = bcd2bin((date >> MVRTC_MON_SFT) & MVRTC_MON_MSK); in __mv_rtc_get()
48 t->tm_year = bcd2bin((date >> MVRTC_YEAR_SFT) & MVRTC_YEAR_MSK); in __mv_rtc_get()
114 sec = bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK); in __mv_rtc_reset()
118 if (sec == bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK)) in __mv_rtc_reset()
Drv3029.c51 tmp->tm_sec = bcd2bin( buf[RV3029C2_W_SECONDS] & 0x7f); in rtc_get()
52 tmp->tm_min = bcd2bin( buf[RV3029C2_W_MINUTES] & 0x7f); in rtc_get()
55 tmp->tm_hour = bcd2bin(buf[RV3029C2_W_HOURS] & 0x1f); in rtc_get()
60 tmp->tm_hour = bcd2bin(buf[RV3029C2_W_HOURS] & 0x3f); in rtc_get()
62 tmp->tm_mday = bcd2bin( buf[RV3029C2_W_DATE] & 0x3F ); in rtc_get()
63 tmp->tm_mon = bcd2bin( buf[RV3029C2_W_MONTHS] & 0x1F ); in rtc_get()
64 tmp->tm_wday = bcd2bin( buf[RV3029C2_W_DAYS] & 0x07 ); in rtc_get()
66 tmp->tm_year = bcd2bin( buf[RV3029C2_W_YEARS]) + 2000; in rtc_get()
Dm41t11.c85 tmp->tm_sec = bcd2bin (data[RTC_SEC_ADDR] & 0x7F); in rtc_get()
86 tmp->tm_min = bcd2bin (data[RTC_MIN_ADDR] & 0x7F); in rtc_get()
87 tmp->tm_hour = bcd2bin (data[RTC_HOUR_ADDR] & 0x3F); in rtc_get()
88 tmp->tm_mday = bcd2bin (data[RTC_DATE_ADDR] & 0x3F); in rtc_get()
89 tmp->tm_mon = bcd2bin (data[RTC_MONTH_ADDR]& 0x1F); in rtc_get()
92 + bcd2bin(data[RTC_YEARS_ADDR]) in rtc_get()
107 tmp->tm_year =((int)cent*100)+bcd2bin(data[RTC_YEARS_ADDR]); in rtc_get()
110 tmp->tm_wday = bcd2bin (data[RTC_DAY_ADDR] & 0x07); in rtc_get()
Ddavinci.c40 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get()
41 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get()
42 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
43 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get()
44 tmp->tm_mon = bcd2bin(mon_cent & 0x1F); in rtc_get()
45 tmp->tm_year = bcd2bin(year) + 2000; in rtc_get()
46 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get()
Dpcf8563.c53 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
54 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
55 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
56 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
57 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get()
58 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 1900 : 2000); in rtc_get()
59 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
Dpt7c4338.c88 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get()
89 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get()
90 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
91 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get()
92 tmp->tm_mon = bcd2bin(mon & 0x1F); in rtc_get()
93 tmp->tm_year = bcd2bin(year) + 2000; in rtc_get()
94 tmp->tm_wday = bcd2bin((wday - 1) & 0x07); in rtc_get()
Dm41t94.c102 tm->tm_sec = bcd2bin(spi_w8r8(slave, M41T94_REG_SECONDS)); in rtc_get()
103 tm->tm_min = bcd2bin(spi_w8r8(slave, M41T94_REG_MINUTES)); in rtc_get()
105 tm->tm_hour = bcd2bin(hour & 0x3f); in rtc_get()
106 tm->tm_wday = bcd2bin(spi_w8r8(slave, M41T94_REG_WDAY)) - 1; in rtc_get()
107 tm->tm_mday = bcd2bin(spi_w8r8(slave, M41T94_REG_DAY)); in rtc_get()
108 tm->tm_mon = bcd2bin(spi_w8r8(slave, M41T94_REG_MONTH)) - 1; in rtc_get()
109 tm->tm_year = bcd2bin(spi_w8r8(slave, M41T94_REG_YEAR)); in rtc_get()
Dds1556.c83 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get()
84 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get()
85 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get()
86 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get()
87 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get()
88 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get()
91 tmp->tm_year = bcd2bin( year ) + in rtc_get()
92 ( bcd2bin( century & 0x3F ) * 100 ); in rtc_get()
Drs5c372.c56 #define HOURS_12(n) bcd2bin((n) & 0x1F)
57 #define HOURS_24(n) bcd2bin((n) & 0x3F)
121 dt->tm_sec = bcd2bin(buf[1]); in rs5c372_convert_to_time()
122 dt->tm_min = bcd2bin(buf[2]); in rs5c372_convert_to_time()
131 dt->tm_mday = bcd2bin(buf[5]); in rs5c372_convert_to_time()
132 dt->tm_mon = bcd2bin(buf[6]); in rs5c372_convert_to_time()
133 dt->tm_year = bcd2bin(buf[7]); in rs5c372_convert_to_time()
139 dt->tm_wday = bcd2bin(buf[4] & 0x07); in rs5c372_convert_to_time()
Dds174x.c80 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get()
81 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get()
82 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get()
83 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get()
84 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get()
85 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get()
88 tmp->tm_year = bcd2bin( year ) + in rtc_get()
89 ( bcd2bin( century & 0x3F ) * 100 ); in rtc_get()
Dm48t35ax.c54 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
55 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
56 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
57 tmp->tm_mday = bcd2bin (date & 0x3F); in rtc_get()
58 tmp->tm_mon = bcd2bin (month & 0x1F); in rtc_get()
59 tmp->tm_year = bcd2bin (year) + ((cent_day & 0x10) ? 2000 : 1900); in rtc_get()
60 tmp->tm_wday = bcd2bin (cent_day & 0x07); in rtc_get()
Dx1205.c101 tm->tm_sec = bcd2bin(buf[CCR_SEC]); in rtc_get()
102 tm->tm_min = bcd2bin(buf[CCR_MIN]); in rtc_get()
103 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ in rtc_get()
104 tm->tm_mday = bcd2bin(buf[CCR_MDAY]); in rtc_get()
105 tm->tm_mon = bcd2bin(buf[CCR_MONTH]); /* mon is 0-11 */ in rtc_get()
106 tm->tm_year = bcd2bin(buf[CCR_YEAR]) in rtc_get()
107 + (bcd2bin(buf[CCR_Y2K]) * 100); in rtc_get()
Dds3231.c89 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
90 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
91 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
92 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
93 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get()
94 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 2000 : 1900); in rtc_get()
95 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get()
Dpcf2127.c67 tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); in pcf2127_rtc_get()
68 tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); in pcf2127_rtc_get()
69 tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); in pcf2127_rtc_get()
70 tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); in pcf2127_rtc_get()
71 tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F) - 1; in pcf2127_rtc_get()
72 tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]) + 1900; in pcf2127_rtc_get()
Dds1337.c103 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
104 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
105 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
106 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
107 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get()
108 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 2000 : 1900); in rtc_get()
109 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get()
Disl1208.c79 tmp->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in isl1208_rtc_get()
80 tmp->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); in isl1208_rtc_get()
81 tmp->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in isl1208_rtc_get()
82 tmp->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); in isl1208_rtc_get()
83 tmp->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F); in isl1208_rtc_get()
84 tmp->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + 2000; in isl1208_rtc_get()
85 tmp->tm_wday = bcd2bin(buf[RTC_DAY_REG_ADDR] & 0x07); in isl1208_rtc_get()
Dds164x.c82 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get()
83 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get()
84 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get()
85 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get()
86 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get()
87 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get()
90 tmp->tm_year = bcd2bin( year ) + RTC_EPOCH; in rtc_get()
Dm41t62.c66 tm->tm_sec = bcd2bin(buf[M41T62_REG_SEC] & 0x7f); in rtc_get()
67 tm->tm_min = bcd2bin(buf[M41T62_REG_MIN] & 0x7f); in rtc_get()
68 tm->tm_hour = bcd2bin(buf[M41T62_REG_HOUR] & 0x3f); in rtc_get()
69 tm->tm_mday = bcd2bin(buf[M41T62_REG_DAY] & 0x3f); in rtc_get()
71 tm->tm_mon = bcd2bin(buf[M41T62_REG_MON] & 0x1f); in rtc_get()
75 tm->tm_year = bcd2bin(buf[M41T62_REG_YEAR]) + 100 + 1900; in rtc_get()
Dmk48t59.c107 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
108 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
109 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
110 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
111 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get()
112 tmp->tm_year = bcd2bin (year); in rtc_get()
113 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
Ds3c24x0_rtc.c87 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get()
88 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get()
89 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
90 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get()
91 tmp->tm_mon = bcd2bin(mon & 0x1F); in rtc_get()
92 tmp->tm_year = bcd2bin(year); in rtc_get()
93 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get()
Dm41t60.c155 tmp->tm_sec = bcd2bin(data[RTC_SEC] & 0x7F); in rtc_get()
156 tmp->tm_min = bcd2bin(data[RTC_MIN] & 0x7F); in rtc_get()
157 tmp->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3F); in rtc_get()
158 tmp->tm_mday = bcd2bin(data[RTC_DATE] & 0x3F); in rtc_get()
159 tmp->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1F); in rtc_get()
160 tmp->tm_year = cb2year(data[RTC_MONTH] >> 6) + bcd2bin(data[RTC_YEAR]); in rtc_get()
161 tmp->tm_wday = bcd2bin(data[RTC_DAY] & 0x07) - 1; in rtc_get()

12