Lines Matching full:dt
44 static int ds1347_read_time(struct device *dev, struct rtc_time *dt) in ds1347_read_time() argument
57 dt->tm_sec = bcd2bin(buf[0]); in ds1347_read_time()
58 dt->tm_min = bcd2bin(buf[1]); in ds1347_read_time()
59 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in ds1347_read_time()
60 dt->tm_mday = bcd2bin(buf[3]); in ds1347_read_time()
61 dt->tm_mon = bcd2bin(buf[4]) - 1; in ds1347_read_time()
62 dt->tm_wday = bcd2bin(buf[5]) - 1; in ds1347_read_time()
63 dt->tm_year = bcd2bin(buf[6]) + 100; in ds1347_read_time()
68 static int ds1347_set_time(struct device *dev, struct rtc_time *dt) in ds1347_set_time() argument
76 buf[0] = bin2bcd(dt->tm_sec); in ds1347_set_time()
77 buf[1] = bin2bcd(dt->tm_min); in ds1347_set_time()
78 buf[2] = (bin2bcd(dt->tm_hour) & 0x3F); in ds1347_set_time()
79 buf[3] = bin2bcd(dt->tm_mday); in ds1347_set_time()
80 buf[4] = bin2bcd(dt->tm_mon + 1); in ds1347_set_time()
81 buf[5] = bin2bcd(dt->tm_wday + 1); in ds1347_set_time()
85 dt->tm_year = dt->tm_year % 100; in ds1347_set_time()
87 buf[6] = bin2bcd(dt->tm_year); in ds1347_set_time()