X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Documentation%2Frtc.txt;h=e20b19c1b60da04b95cfc62a0cec57428a53bb12;hb=2cc3a8f6ac0fb1e6095a47001d31aadcf9722bde;hp=7c701b88d6d59dd4e1068a8ad22a4321704737a0;hpb=4750def52cb2c21732dda9aa1d43a07db37b0186;p=linux-2.6 diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 7c701b88d6..e20b19c1b6 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt @@ -180,9 +180,10 @@ driver returns ENOIOCTLCMD. Some common examples: * 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 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 - initialization routines so the framework can sanity check the user - input for you. + structure. Your driver needs to initialize the irq_freq member during + init. Make sure you check the requested frequency is in range of your + 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! @@ -385,7 +386,7 @@ test_PIE: /* not all RTCs support periodic IRQs */ if (errno == ENOTTY) { fprintf(stderr, "\nNo periodic IRQ support\n"); - return 0; + goto done; } perror("RTC_IRQP_READ ioctl"); exit(errno);