From: Michael Hunold <hunold@linuxtv.org>
To: linux-kernel@vger.kernel.org
Cc: John Stultz <john.stultz@linaro.org>
Subject: Minimal requirements for RTC drivers
Date: Mon, 04 Apr 2011 08:55:48 +0200 [thread overview]
Message-ID: <4D996B74.4070502@linuxtv.org> (raw)
Hello John,
I have been working on a new RTC driver for some custom RTC device
lately. It has the usual features like AIE, UIE and PIE.
I cloned the rtc-test.c driver as Documentation/rtc.txt suggested and
noticed that my driver would work with the test application even though
some of the driver functions were not implemented at all...
So I found out about your recent changes with regard to "RTC
virtualisation" and I understood the steps you have taken. It's not
necessary to provide all functionality through the RTC driver directly
any more, because some of the stuff is emulated via hrtimers.
One problem is that the documentation and the code have gotten out of
sync. People like me, who dive into the RTC subsystem for the first
time, can be easily fooled now.
So the main question now is what the minimal required functionality for
a RTC driver now actually is. Can you give me some hints?
I think it would be best if the rtc-test.c driver could be updated to
have a template new drivers can be cloned from.
Another thing that catched my eye is the current use of the read_alarm()
member in struct rtc_class_ops in rtc_read_alarm() in
drivers/rtc/interface.c. This is the only place where the member is used
and it's only used as a boolean there. The driver specific read_alarm()
op is never actually called, so I think that op can be transformed into
a boolean and all the read_alarm() functions from all the rtc drivers
can be removed - that's quite a lot of a code.
Best regards
Michael.
next reply other threads:[~2011-04-04 7:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 6:55 Michael Hunold [this message]
2011-04-04 23:46 ` Minimal requirements for RTC drivers John Stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D996B74.4070502@linuxtv.org \
--to=hunold@linuxtv.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox