Lines Matching full:dt
53 static int max6916_read_time(struct device *dev, struct rtc_time *dt) in max6916_read_time() argument
66 dt->tm_sec = bcd2bin(buf[0]); in max6916_read_time()
67 dt->tm_min = bcd2bin(buf[1]); in max6916_read_time()
68 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in max6916_read_time()
69 dt->tm_mday = bcd2bin(buf[3]); in max6916_read_time()
70 dt->tm_mon = bcd2bin(buf[4]) - 1; in max6916_read_time()
71 dt->tm_wday = bcd2bin(buf[5]) - 1; in max6916_read_time()
72 dt->tm_year = bcd2bin(buf[6]) + 100; in max6916_read_time()
77 static int max6916_set_time(struct device *dev, struct rtc_time *dt) in max6916_set_time() argument
82 if (dt->tm_year < 100 || dt->tm_year > 199) { in max6916_set_time()
84 dt->tm_year + 1900); in max6916_set_time()
89 buf[1] = bin2bcd(dt->tm_sec); in max6916_set_time()
90 buf[2] = bin2bcd(dt->tm_min); in max6916_set_time()
91 buf[3] = (bin2bcd(dt->tm_hour) & 0X3F); in max6916_set_time()
92 buf[4] = bin2bcd(dt->tm_mday); in max6916_set_time()
93 buf[5] = bin2bcd(dt->tm_mon + 1); in max6916_set_time()
94 buf[6] = bin2bcd(dt->tm_wday + 1); in max6916_set_time()
95 buf[7] = bin2bcd(dt->tm_year % 100); in max6916_set_time()