Lines Matching refs:t

92 static int fm3130_get_time(struct device *dev, struct rtc_time *t)  in fm3130_get_time()  argument
117 t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); in fm3130_get_time()
118 t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); in fm3130_get_time()
120 t->tm_hour = bcd2bin(tmp); in fm3130_get_time()
121 t->tm_wday = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1; in fm3130_get_time()
122 t->tm_mday = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); in fm3130_get_time()
124 t->tm_mon = bcd2bin(tmp) - 1; in fm3130_get_time()
127 t->tm_year = bcd2bin(fm3130->regs[FM3130_RTC_YEARS]) + 100; in fm3130_get_time()
131 "read", t->tm_sec, t->tm_min, in fm3130_get_time()
132 t->tm_hour, t->tm_mday, in fm3130_get_time()
133 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_get_time()
139 static int fm3130_set_time(struct device *dev, struct rtc_time *t) in fm3130_set_time() argument
147 "write", t->tm_sec, t->tm_min, in fm3130_set_time()
148 t->tm_hour, t->tm_mday, in fm3130_set_time()
149 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_set_time()
152 buf[FM3130_RTC_SECONDS] = bin2bcd(t->tm_sec); in fm3130_set_time()
153 buf[FM3130_RTC_MINUTES] = bin2bcd(t->tm_min); in fm3130_set_time()
154 buf[FM3130_RTC_HOURS] = bin2bcd(t->tm_hour); in fm3130_set_time()
155 buf[FM3130_RTC_DAY] = bin2bcd(t->tm_wday + 1); in fm3130_set_time()
156 buf[FM3130_RTC_DATE] = bin2bcd(t->tm_mday); in fm3130_set_time()
157 buf[FM3130_RTC_MONTHS] = bin2bcd(t->tm_mon + 1); in fm3130_set_time()
160 tmp = t->tm_year - 100; in fm3130_set_time()