Lines Matching refs:t
95 static int fm3130_get_time(struct device *dev, struct rtc_time *t) in fm3130_get_time() argument
121 t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); in fm3130_get_time()
122 t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); in fm3130_get_time()
124 t->tm_hour = bcd2bin(tmp); in fm3130_get_time()
125 t->tm_wday = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1; in fm3130_get_time()
126 t->tm_mday = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); in fm3130_get_time()
128 t->tm_mon = bcd2bin(tmp) - 1; in fm3130_get_time()
131 t->tm_year = bcd2bin(fm3130->regs[FM3130_RTC_YEARS]) + 100; in fm3130_get_time()
135 "read", t->tm_sec, t->tm_min, in fm3130_get_time()
136 t->tm_hour, t->tm_mday, in fm3130_get_time()
137 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_get_time()
140 return rtc_valid_tm(t); in fm3130_get_time()
144 static int fm3130_set_time(struct device *dev, struct rtc_time *t) in fm3130_set_time() argument
152 "write", t->tm_sec, t->tm_min, in fm3130_set_time()
153 t->tm_hour, t->tm_mday, in fm3130_set_time()
154 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_set_time()
157 buf[FM3130_RTC_SECONDS] = bin2bcd(t->tm_sec); in fm3130_set_time()
158 buf[FM3130_RTC_MINUTES] = bin2bcd(t->tm_min); in fm3130_set_time()
159 buf[FM3130_RTC_HOURS] = bin2bcd(t->tm_hour); in fm3130_set_time()
160 buf[FM3130_RTC_DAY] = bin2bcd(t->tm_wday + 1); in fm3130_set_time()
161 buf[FM3130_RTC_DATE] = bin2bcd(t->tm_mday); in fm3130_set_time()
162 buf[FM3130_RTC_MONTHS] = bin2bcd(t->tm_mon + 1); in fm3130_set_time()
165 tmp = t->tm_year - 100; in fm3130_set_time()