mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <johnstul@us.ibm.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Thomas Gleixner <tglx@linutronix.de>,
	Richard Cochran <richardcochran@gmail.com>
Subject: [PATCH 0/6] [RFC] A posix clock/timer interface to the RTC
Date: Fri, 15 Oct 2010 17:38:49 -0700	[thread overview]
Message-ID: <1287189535-24649-1-git-send-email-john.stultz@linaro.org> (raw)

From: John Stultz <johnstul@us.ibm.com>


This patchset allows the RTC to be managed via the posix_clocks/timers
interface. This allows applications to program timer events that will 
wake the system from suspend state. If the system is not suspended, the
timers fire like normal posix timers.

Currently, if an application wants to trigger a RTC alarm to wake up
from suspend, they must use the sysfs wakealarm interface or the rtc
chardev RTC_WKALM_SET ioctl. The limitation with this interface is
that it is fairly hardware oriented, so multiple applications cannot
set an RTC alarm without overwriting any previous alarms set by other
applications.

The in-kernel posix interface allows for the kernel to manage a list
of timers that control when the alarm is fired, so applications
do not need to coordinate access to the alarm hardware.

My earlier proof-of-concept hack/patch for this work (see
http://lwn.net/Articles/405986/ ) did not get much review from the 
RTC folks, so I've carried on reworking a number of layers of code
in order to make this functionality something that could possibly be
upstreamed in the future.

The patches are still fairly rough, but together they do function, so
while there is still work to be done, I wanted to send this out again
so folks had an idea of the scope of the work and could make
suggestions as to where I've gone wrong. :)

So please let me know what you think.

thanks
-john


CC: Alessandro Zummo <a.zummo@towertech.it>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Richard Cochran <richardcochran@gmail.com>


John Stultz (5):
  [RFC] Introduce timerlist infrastructure.
  [RFC] hrtimers: Convert hrtimers to use timerlist infrastructure
  [RFC] RTC: Rework RTC code to use timerlist for events
  [RFC] RTC: Remove UIE emulation
  [RFC] RTC: Add posix clock/timer interface

Richard Cochran (1):
  [RFC] posix clocks: dynamic clock ids.

 drivers/rtc/Makefile         |    2 +-
 drivers/rtc/class.c          |   23 ++
 drivers/rtc/interface.c      |  453 +++++++++++++++++++++---------------------
 drivers/rtc/posix.c          |  274 +++++++++++++++++++++++++
 drivers/rtc/rtc-dev.c        |  104 ----------
 drivers/rtc/rtc-lib.c        |   26 +++
 drivers/rtc/rtc-sysfs.c      |   10 +
 include/linux/hrtimer.h      |   32 ++--
 include/linux/posix-timers.h |    9 +-
 include/linux/rtc.h          |   49 +++--
 include/linux/time.h         |    2 +
 include/linux/timerlist.h    |   37 ++++
 kernel/hrtimer.c             |   86 +++-----
 kernel/posix-timers.c        |   41 +++-
 kernel/time/timer_list.c     |    8 +-
 lib/Makefile                 |    2 +-
 lib/timerlist.c              |  115 +++++++++++
 17 files changed, 843 insertions(+), 430 deletions(-)
 create mode 100644 drivers/rtc/posix.c
 create mode 100644 include/linux/timerlist.h
 create mode 100644 lib/timerlist.c

             reply	other threads:[~2010-10-16  0:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16  0:38 John Stultz [this message]
2010-10-16  0:38 ` [PATCH 1/6] [RFC] posix clocks: dynamic clock ids John Stultz
2010-10-16  0:38   ` [PATCH 2/6] [RFC] Introduce timerlist infrastructure John Stultz
2010-10-16  0:38     ` [PATCH 3/6] [RFC] hrtimers: Convert hrtimers to use " John Stultz
2010-10-16  0:38       ` [PATCH 4/6] [RFC] RTC: Rework RTC code to use timerlist for events John Stultz
2010-10-16  0:38         ` [PATCH 5/6] [RFC] RTC: Remove UIE emulation John Stultz
2010-10-16  0:38           ` [PATCH 6/6] [RFC] RTC: Add posix clock/timer interface John Stultz
2010-10-18 12:10         ` [PATCH 4/6] [RFC] RTC: Rework RTC code to use timerlist for events Alessandro Zummo
2010-10-19  1:34           ` john stultz
2010-10-18 14:27   ` [PATCH 1/6] [RFC] posix clocks: dynamic clock ids Richard Cochran
2010-10-18 18:01     ` john stultz
2010-10-18 20:44     ` Thomas Gleixner

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=1287189535-24649-1-git-send-email-john.stultz@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome