Lines Matching refs:tm
45 static int em3027_get_time(struct device *dev, struct rtc_time *tm) in em3027_get_time() argument
72 tm->tm_sec = bcd2bin(buf[0]); in em3027_get_time()
73 tm->tm_min = bcd2bin(buf[1]); in em3027_get_time()
74 tm->tm_hour = bcd2bin(buf[2]); in em3027_get_time()
75 tm->tm_mday = bcd2bin(buf[3]); in em3027_get_time()
76 tm->tm_wday = bcd2bin(buf[4]); in em3027_get_time()
77 tm->tm_mon = bcd2bin(buf[5]); in em3027_get_time()
78 tm->tm_year = bcd2bin(buf[6]) + 100; in em3027_get_time()
83 static int em3027_set_time(struct device *dev, struct rtc_time *tm) in em3027_set_time() argument
95 buf[1] = bin2bcd(tm->tm_sec); in em3027_set_time()
96 buf[2] = bin2bcd(tm->tm_min); in em3027_set_time()
97 buf[3] = bin2bcd(tm->tm_hour); in em3027_set_time()
98 buf[4] = bin2bcd(tm->tm_mday); in em3027_set_time()
99 buf[5] = bin2bcd(tm->tm_wday); in em3027_set_time()
100 buf[6] = bin2bcd(tm->tm_mon); in em3027_set_time()
101 buf[7] = bin2bcd(tm->tm_year % 100); in em3027_set_time()