Lines Matching refs:rtc_fd
37 int rtc_fd = -1; variable
70 ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm); in read_alarm_test()
99 ret = ioctl(rtc_fd, RTC_ALM_SET, &rtc_tm); in read_alarm_test()
109 ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm); in read_alarm_test()
123 ret = ioctl(rtc_fd, RTC_AIE_ON, 0); in read_alarm_test()
135 FD_SET(rtc_fd, &rfds); in read_alarm_test()
137 ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv); /*wait for alarm */ in read_alarm_test()
143 ret = read(rtc_fd, &data, sizeof(unsigned long)); in read_alarm_test()
155 ret = ioctl(rtc_fd, RTC_AIE_OFF, 0); in read_alarm_test()
177 ret = ioctl(rtc_fd, RTC_UIE_ON, 0); in update_interrupts_test()
193 FD_SET(rtc_fd, &rfds); in update_interrupts_test()
195 ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv); in update_interrupts_test()
200 ret = read(rtc_fd, &data, sizeof(unsigned long)); in update_interrupts_test()
214 ret = ioctl(rtc_fd, RTC_UIE_OFF, 0); in update_interrupts_test()
231 rtc_fd = open(rtc_dev, O_RDONLY); in main()
233 if (rtc_fd < 0) in main()
242 close(rtc_fd); in main()