Lines Matching refs:tmp
38 int rtc_get (struct rtc_time *tmp) in rtc_get() argument
65 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get()
66 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get()
67 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
68 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get()
69 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get()
70 tmp->tm_year = bcd2bin (year) + bcd2bin(cent) * 100; in rtc_get()
71 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
72 tmp->tm_yday = 0; in rtc_get()
73 tmp->tm_isdst= 0; in rtc_get()
76 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get()
77 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
82 int rtc_set (struct rtc_time *tmp) in rtc_set() argument
86 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set()
87 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
91 rtc_write (0x92, bin2bcd(tmp->tm_year / 100)); in rtc_set()
92 rtc_write (0x8c, bin2bcd(tmp->tm_year % 100)); in rtc_set()
93 rtc_write (0x8a, bin2bcd(tmp->tm_wday)); in rtc_set()
94 rtc_write (0x88, bin2bcd(tmp->tm_mon)); in rtc_set()
95 rtc_write (0x86, bin2bcd(tmp->tm_mday)); in rtc_set()
96 rtc_write (0x84, bin2bcd(tmp->tm_hour)); in rtc_set()
97 rtc_write (0x82, bin2bcd(tmp->tm_min )); in rtc_set()
98 rtc_write (0x80, bin2bcd(tmp->tm_sec )); in rtc_set()