Commit 108b4c36 authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds

rtc: tweak driver documentation for rtc periodic

The max_user_freq member is not really meant for RTC drivers to modify, so
update the rtc documentation so drivers writers know what is expected of
them when handling periodic events.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fcbaa088
...@@ -180,9 +180,10 @@ driver returns ENOIOCTLCMD. Some common examples: ...@@ -180,9 +180,10 @@ driver returns ENOIOCTLCMD. Some common examples:
* RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called
to set the frequency while the framework will handle the read for you to set the frequency while the framework will handle the read for you
since the frequency is stored in the irq_freq member of the rtc_device since the frequency is stored in the irq_freq member of the rtc_device
structure. Also make sure you set the max_user_freq member in your structure. Your driver needs to initialize the irq_freq member during
initialization routines so the framework can sanity check the user init. Make sure you check the requested frequency is in range of your
input for you. hardware in the irq_set_freq function. If you cannot actually change
the frequency, just return -ENOTTY.
If all else fails, check out the rtc-test.c driver! If all else fails, check out the rtc-test.c driver!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment