Lines Matching refs:tmp
24 int rtc_get (struct rtc_time *tmp) in rtc_get() argument
52 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
53 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
54 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
55 tmp->tm_mday = bcd2bin (date & 0x3F); in rtc_get()
56 tmp->tm_mon = bcd2bin (month & 0x1F); in rtc_get()
57 tmp->tm_year = bcd2bin (year) + ((cent_day & 0x10) ? 2000 : 1900); in rtc_get()
58 tmp->tm_wday = bcd2bin (cent_day & 0x07); in rtc_get()
59 tmp->tm_yday = 0; in rtc_get()
60 tmp->tm_isdst= 0; in rtc_get()
63 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get()
64 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
69 int rtc_set (struct rtc_time *tmp) in rtc_set() argument
75 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set()
76 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
83 rtc_write (0x07, bin2bcd(tmp->tm_year % 100)); in rtc_set()
84 rtc_write (0x06, bin2bcd(tmp->tm_mon)); in rtc_set()
85 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
87 century = ((tmp->tm_year >= 2000) ? 0x10 : 0) | 0x20; in rtc_set()
88 rtc_write (0x04, bin2bcd(tmp->tm_wday) | century); in rtc_set()
90 rtc_write (0x03, bin2bcd(tmp->tm_hour)); in rtc_set()
91 rtc_write (0x02, bin2bcd(tmp->tm_min )); in rtc_set()
92 rtc_write (0x01, bin2bcd(tmp->tm_sec )); in rtc_set()