1. 04 2月, 2011 2 次提交
    • J
      RTC: Fix rtc driver ioctl specific shortcutting · ac54cd2b
      John Stultz 提交于
      Some RTC drivers enable functionality directly via their ioctl method
      instead of using the generic ioctl handling code. With the recent
      virtualization of the RTC layer, its now important that the generic
      layer always be used.
      
      This patch moved the rtc driver ioctl method call to after the generic
      ioctl processing is done. This allows hardware specific features or
      ioctls to still function, while relying on the generic code for handling
      everything else.
      
      This patch on its own may more obviously break rtc drivers that
      implement the alarm irq enablement via their ioctl method instead of
      implementing the alarm_irq_eanble method. Those drivers will be fixed
      in a following patch. Additionaly, those drivers are already likely to
      not be functioning reliably without this patch.
      
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
      CC: Thomas Gleixner <tglx@linutronix.de>
      Reported-by: NMarcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
      Tested-by: NMarcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      ac54cd2b
    • M
      RTC: Prevents a division by zero in kernel code. · 83a06bf5
      Marcelo Roberto Jimenez 提交于
      This patch prevents a user space program from calling the RTC_IRQP_SET
      ioctl with a negative value of frequency. Also, if this call is make
      with a zero value of frequency, there would be a division by zero in the
      kernel code.
      
      [jstultz: Also initialize irq_freq to 1 to catch other divbyzero issues]
      
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NMarcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      83a06bf5
  2. 22 1月, 2011 3 次提交
  3. 14 1月, 2011 4 次提交
  4. 11 1月, 2011 1 次提交
  5. 24 12月, 2010 1 次提交
    • T
      rtc: don't use flush_scheduled_work() · 9db8995b
      Tejun Heo 提交于
      flush_scheduled_work() is deprecated and scheduled to be removed.  On
      removal, directly cancel the work, and flush the uie_task in
      rtc-dev.c::clear_uie().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: rtc-linux@googlegroups.com
      9db8995b
  6. 23 12月, 2010 1 次提交
  7. 21 12月, 2010 1 次提交
  8. 14 12月, 2010 1 次提交
  9. 11 12月, 2010 2 次提交
    • J
      RTC: Remove UIE emulation · 042620a0
      John Stultz 提交于
      Since we provide UIE interrupts via a rtc_timer, the old
      emulation code can be removed.
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-5-git-send-email-john.stultz@linaro.org>
      Acked-by: NAlessandro Zummo <a.zummo@towertech.it>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      042620a0
    • J
      RTC: Rework RTC code to use timerqueue for events · 6610e089
      John Stultz 提交于
      This patch reworks a large portion of the generic RTC code
      to in-effect virtualize the rtc interrupt code.
      
      The current RTC interface is very much a raw hardware interface.
      Via the proc, /dev/, or sysfs interfaces, applciations can set
      the hardware to trigger interrupts in one of three modes:
      
      AIE: Alarm interrupt
      UIE: Update interrupt (ie: once per second)
      PIE: Periodic interrupt (sub-second irqs)
      
      The problem with this interface is that it limits the RTC hardware
      so it can only be used by one application at a time.
      
      The purpose of this patch is to extend the RTC code so that we can
      multiplex multiple applications event needs onto a single RTC device.
      This is done by utilizing the timerqueue infrastructure to manage
      a list of events, which cause the RTC hardware to be programmed
      to fire an interrupt for the next event in the list.
      
      In order to preserve the functionality of the exsting proc,/dev/ and
      sysfs interfaces, we emulate the different interrupt modes as follows:
      
      AIE: We create a rtc_timer dedicated to AIE mode interrupts. There is
      only one per device, so we don't change existing interface semantics.
      
      UIE: Again, a dedicated rtc_timer, set for periodic mode, is used
      to emulate UIE interrupts. Again, only one per device.
      
      PIE: Since PIE mode interrupts fire faster then the RTC's clock read
      granularity, we emulate PIE mode interrupts using a hrtimer. Again,
      one per device.
      
      With this patch, the rtctest.c application in Documentation/rtc.txt
      passes fine on x86 hardware. However, there may very well still be
      bugs, so greatly I'd appreciate any feedback or testing!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-4-git-send-email-john.stultz@linaro.org>
      Acked-by: NAlessandro Zummo <a.zummo@towertech.it>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      6610e089
  10. 29 11月, 2010 1 次提交
  11. 17 11月, 2010 1 次提交
  12. 11 11月, 2010 1 次提交
  13. 10 11月, 2010 3 次提交
  14. 08 11月, 2010 1 次提交
  15. 29 10月, 2010 4 次提交
  16. 28 10月, 2010 13 次提交