Lines Matching full:dt
108 static int rx8010_get_time(struct device *dev, struct rtc_time *dt) in rx8010_get_time() argument
129 dt->tm_sec = bcd2bin(date[RX8010_SEC - RX8010_SEC] & 0x7f); in rx8010_get_time()
130 dt->tm_min = bcd2bin(date[RX8010_MIN - RX8010_SEC] & 0x7f); in rx8010_get_time()
131 dt->tm_hour = bcd2bin(date[RX8010_HOUR - RX8010_SEC] & 0x3f); in rx8010_get_time()
132 dt->tm_mday = bcd2bin(date[RX8010_MDAY - RX8010_SEC] & 0x3f); in rx8010_get_time()
133 dt->tm_mon = bcd2bin(date[RX8010_MONTH - RX8010_SEC] & 0x1f) - 1; in rx8010_get_time()
134 dt->tm_year = bcd2bin(date[RX8010_YEAR - RX8010_SEC]) + 100; in rx8010_get_time()
135 dt->tm_wday = ffs(date[RX8010_WDAY - RX8010_SEC] & 0x7f); in rx8010_get_time()
140 static int rx8010_set_time(struct device *dev, struct rtc_time *dt) in rx8010_set_time() argument
147 if ((dt->tm_year < 100) || (dt->tm_year > 199)) in rx8010_set_time()
160 date[RX8010_SEC - RX8010_SEC] = bin2bcd(dt->tm_sec); in rx8010_set_time()
161 date[RX8010_MIN - RX8010_SEC] = bin2bcd(dt->tm_min); in rx8010_set_time()
162 date[RX8010_HOUR - RX8010_SEC] = bin2bcd(dt->tm_hour); in rx8010_set_time()
163 date[RX8010_MDAY - RX8010_SEC] = bin2bcd(dt->tm_mday); in rx8010_set_time()
164 date[RX8010_MONTH - RX8010_SEC] = bin2bcd(dt->tm_mon + 1); in rx8010_set_time()
165 date[RX8010_YEAR - RX8010_SEC] = bin2bcd(dt->tm_year - 100); in rx8010_set_time()
166 date[RX8010_WDAY - RX8010_SEC] = bin2bcd(1 << dt->tm_wday); in rx8010_set_time()