Lines Matching refs:dt
48 static int ds1347_read_time(struct device *dev, struct rtc_time *dt) in ds1347_read_time() argument
61 dt->tm_sec = bcd2bin(buf[0]); in ds1347_read_time()
62 dt->tm_min = bcd2bin(buf[1]); in ds1347_read_time()
63 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in ds1347_read_time()
64 dt->tm_mday = bcd2bin(buf[3]); in ds1347_read_time()
65 dt->tm_mon = bcd2bin(buf[4]) - 1; in ds1347_read_time()
66 dt->tm_wday = bcd2bin(buf[5]) - 1; in ds1347_read_time()
67 dt->tm_year = bcd2bin(buf[6]) + 100; in ds1347_read_time()
72 static int ds1347_set_time(struct device *dev, struct rtc_time *dt) in ds1347_set_time() argument
80 buf[0] = bin2bcd(dt->tm_sec); in ds1347_set_time()
81 buf[1] = bin2bcd(dt->tm_min); in ds1347_set_time()
82 buf[2] = (bin2bcd(dt->tm_hour) & 0x3F); in ds1347_set_time()
83 buf[3] = bin2bcd(dt->tm_mday); in ds1347_set_time()
84 buf[4] = bin2bcd(dt->tm_mon + 1); in ds1347_set_time()
85 buf[5] = bin2bcd(dt->tm_wday + 1); in ds1347_set_time()
89 dt->tm_year = dt->tm_year % 100; in ds1347_set_time()
91 buf[6] = bin2bcd(dt->tm_year); in ds1347_set_time()