Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to turn on periodic interrupt for RTC from a kernel module ? We can do it from user space using 'RTC_IRQP_SET' and 'RTC_PIE_ON' options. But what about turning it on from kernel module?
'RTC' management is very important so the use of handler/API are preferred;
Quote:
excerpt 'man rtc';
FILES
/dev/rtc, /dev/rtc0, /dev/rtc1, etc: RTC special character device files.
/proc/driver/rtc: status of the (first) RTC.
NOTES
When the kernel's system time is synchronized with an external reference using adjtimex(2) it
will update a designated RTC periodically every 11 minutes. To do so, the kernel has to briefly
turn off periodic interrupts; this might affect programs using that RTC.
An RTC's Epoch has nothing to do with the POSIX Epoch which is only used for the system clock.
If the year according to the RTC's Epoch and the year register is less than 1970 it is assumed to
be 100 years later, that is, between 2000 and 2069.
Some RTCs support "wildcard" values in alarm fields, to support scenarios like periodic alarms at
fifteen minutes after every hour, or on the first day of each month. Such usage is non-portable;
portable user space code only expects a single alarm interrupt, and will either disable or reini-
tialize the alarm after receiving it.
Some RTCs support periodic interrupts with periods that are multiples of a second rather than
fractions of a second; multiple alarms; programmable output clock signals; non-volatile memory;
and other hardware capabilities that are not currently exposed by this API.
SEE ALSO
date(1), adjtimex(2), gettimeofday(2), settimeofday(2), stime(2), time(2), gmtime(3), time(7),
hwclock(8), /usr/src/linux/Documentation/rtc.txt
I turned on periodic interrupt from user space and loaded a kernel module with my ISR for RTC interrupt. What i need exactly is to execute my ISR on each RTC interrupt. But i couldnt find it working. I am attaching the code herewith. Any suggestions on what went wrong ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.