Lines Matching full:dt
208 static int v3020_read_time(struct device *dev, struct rtc_time *dt) in v3020_read_time() argument
218 dt->tm_sec = bcd2bin(tmp); in v3020_read_time()
220 dt->tm_min = bcd2bin(tmp); in v3020_read_time()
222 dt->tm_hour = bcd2bin(tmp); in v3020_read_time()
224 dt->tm_mday = bcd2bin(tmp); in v3020_read_time()
226 dt->tm_mon = bcd2bin(tmp) - 1; in v3020_read_time()
228 dt->tm_wday = bcd2bin(tmp); in v3020_read_time()
230 dt->tm_year = bcd2bin(tmp)+100; in v3020_read_time()
233 dev_dbg(dev, "tm_hour: %i\n", dt->tm_hour); in v3020_read_time()
234 dev_dbg(dev, "tm_min : %i\n", dt->tm_min); in v3020_read_time()
235 dev_dbg(dev, "tm_sec : %i\n", dt->tm_sec); in v3020_read_time()
236 dev_dbg(dev, "tm_year: %i\n", dt->tm_year); in v3020_read_time()
237 dev_dbg(dev, "tm_mon : %i\n", dt->tm_mon); in v3020_read_time()
238 dev_dbg(dev, "tm_mday: %i\n", dt->tm_mday); in v3020_read_time()
239 dev_dbg(dev, "tm_wday: %i\n", dt->tm_wday); in v3020_read_time()
245 static int v3020_set_time(struct device *dev, struct rtc_time *dt) in v3020_set_time() argument
250 dev_dbg(dev, "tm_sec : %i\n", dt->tm_sec); in v3020_set_time()
251 dev_dbg(dev, "tm_min : %i\n", dt->tm_min); in v3020_set_time()
252 dev_dbg(dev, "tm_hour: %i\n", dt->tm_hour); in v3020_set_time()
253 dev_dbg(dev, "tm_mday: %i\n", dt->tm_mday); in v3020_set_time()
254 dev_dbg(dev, "tm_wday: %i\n", dt->tm_wday); in v3020_set_time()
255 dev_dbg(dev, "tm_year: %i\n", dt->tm_year); in v3020_set_time()
258 v3020_set_reg(chip, V3020_SECONDS, bin2bcd(dt->tm_sec)); in v3020_set_time()
259 v3020_set_reg(chip, V3020_MINUTES, bin2bcd(dt->tm_min)); in v3020_set_time()
260 v3020_set_reg(chip, V3020_HOURS, bin2bcd(dt->tm_hour)); in v3020_set_time()
261 v3020_set_reg(chip, V3020_MONTH_DAY, bin2bcd(dt->tm_mday)); in v3020_set_time()
262 v3020_set_reg(chip, V3020_MONTH, bin2bcd(dt->tm_mon + 1)); in v3020_set_time()
263 v3020_set_reg(chip, V3020_WEEK_DAY, bin2bcd(dt->tm_wday)); in v3020_set_time()
264 v3020_set_reg(chip, V3020_YEAR, bin2bcd(dt->tm_year % 100)); in v3020_set_time()