Lines Matching full:dt
50 static int ds1347_read_time(struct device *dev, struct rtc_time *dt) in ds1347_read_time() argument
78 dt->tm_sec = bcd2bin(buf[0]); in ds1347_read_time()
79 dt->tm_min = bcd2bin(buf[1] & 0x7f); in ds1347_read_time()
80 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in ds1347_read_time()
81 dt->tm_mday = bcd2bin(buf[3]); in ds1347_read_time()
82 dt->tm_mon = bcd2bin(buf[4]) - 1; in ds1347_read_time()
83 dt->tm_wday = bcd2bin(buf[5]) - 1; in ds1347_read_time()
84 dt->tm_year = (bcd2bin(century) * 100) + bcd2bin(buf[6]) - 1900; in ds1347_read_time()
89 static int ds1347_set_time(struct device *dev, struct rtc_time *dt) in ds1347_set_time() argument
101 buf[0] = bin2bcd(dt->tm_sec); in ds1347_set_time()
102 buf[1] = bin2bcd(dt->tm_min); in ds1347_set_time()
103 buf[2] = (bin2bcd(dt->tm_hour) & 0x3F); in ds1347_set_time()
104 buf[3] = bin2bcd(dt->tm_mday); in ds1347_set_time()
105 buf[4] = bin2bcd(dt->tm_mon + 1); in ds1347_set_time()
106 buf[5] = bin2bcd(dt->tm_wday + 1); in ds1347_set_time()
107 buf[6] = bin2bcd(dt->tm_year % 100); in ds1347_set_time()
114 century = (dt->tm_year / 100) + 19; in ds1347_set_time()