Lines Matching refs:t
56 static inline void tmday2rtc(struct rtc_time *t, struct bd70528_rtc_day *d) in tmday2rtc() argument
61 d->sec |= bin2bcd(t->tm_sec); in tmday2rtc()
62 d->min |= bin2bcd(t->tm_min); in tmday2rtc()
63 d->hour |= bin2bcd(t->tm_hour); in tmday2rtc()
66 static inline void tm2rtc(struct rtc_time *t, struct bd70528_rtc_data *r) in tm2rtc() argument
77 tmday2rtc(t, &r->time); in tm2rtc()
82 r->day |= bin2bcd(t->tm_mday); in tm2rtc()
83 r->week |= bin2bcd(t->tm_wday); in tm2rtc()
84 r->month |= bin2bcd(t->tm_mon + 1); in tm2rtc()
85 r->year = bin2bcd(t->tm_year - 100); in tm2rtc()
88 static inline void rtc2tm(struct bd70528_rtc_data *r, struct rtc_time *t) in rtc2tm() argument
90 t->tm_sec = bcd2bin(r->time.sec & BD70528_MASK_RTC_SEC); in rtc2tm()
91 t->tm_min = bcd2bin(r->time.min & BD70528_MASK_RTC_MINUTE); in rtc2tm()
92 t->tm_hour = bcd2bin(r->time.hour & BD70528_MASK_RTC_HOUR); in rtc2tm()
98 t->tm_hour %= 12; in rtc2tm()
100 t->tm_hour += 12; in rtc2tm()
102 t->tm_mday = bcd2bin(r->day & BD70528_MASK_RTC_DAY); in rtc2tm()
103 t->tm_mon = bcd2bin(r->month & BD70528_MASK_RTC_MONTH) - 1; in rtc2tm()
104 t->tm_year = 100 + bcd2bin(r->year & BD70528_MASK_RTC_YEAR); in rtc2tm()
105 t->tm_wday = bcd2bin(r->week & BD70528_MASK_RTC_WEEK); in rtc2tm()
160 static int bd71828_set_time(struct device *dev, struct rtc_time *t) in bd71828_set_time() argument
172 tm2rtc(t, &rtc_data); in bd71828_set_time()
182 static int bd70528_get_time(struct device *dev, struct rtc_time *t) in bd70528_get_time() argument
196 rtc2tm(&rtc_data, t); in bd70528_get_time()
304 struct rtc_time t; in bd70528_probe() local
306 ret = rtc_ops->read_time(&pdev->dev, &t); in bd70528_probe()
309 ret = rtc_ops->set_time(&pdev->dev, &t); in bd70528_probe()