1. 30 7月, 2013 1 次提交
  2. 04 7月, 2013 1 次提交
    • B
      rtc: add ability to push out an existing wakealarm using sysfs · 1df0a471
      Bernie Thompson 提交于
      This adds the ability for the rtc sysfs code to handle += characters at
      the beginning of a wakealarm setting string.  This will allow the user
      to attempt to push out an existing wakealarm by a provided amount.
      
      In the case that the += characters are provided but the alarm is not
      active -EINVAL is returned.
      
      his is useful, at least for my purposes in suspend/resume testing.  The
      basic test goes something like:
      
      1. Set a wake alarm from userspace 5 seconds in the future
      
      2. Start the suspend process (echo mem > /sys/power/state)
      
      3. After ~2.5 seconds if userspace is still running (using another
         thread to check this), move the wake alarm 5 more seconds
      
      If the "move" involves an unset of the wakealarm then there's a period
         of time where the system is midway through suspending but has no wake
         alarm.  It will get stuck.
      
      We'd rather not remove the "move" since the idea is to avoid a cancelled
      suspend when the alarm fires _during_ suspend.  It is difficult for the
      test to tell the difference between a suspend that was cancelled because
      the alarm fired too early and a suspend that was
      Signed-off-by: NBernie Thompson <bhthompson@chromium.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Doug Anderson <dianders@chromium.org>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1df0a471
  3. 06 10月, 2012 1 次提交
    • D
      rtc_sysfs_show_hctosys(): display 0 if resume failed · 4c24e29e
      David Fries 提交于
      Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
      contains a 1 (meaning "This rtc was used to initialize the system
      clock") even if setting the time by do_settimeofday() at bootup failed.
      The RTC can also be used to set the clock on resume, if it did 1,
      otherwise 0.  Previously there was no indication if the RTC was used
      to set the clock in resume.
      
      This uses only CONFIG_RTC_HCTOSYS_DEVICE for conditional compilation
      instead of it and CONFIG_RTC_HCTOSYS to be more consistent.
      rtc_hctosys_ret was moved to class.c so class.c no longer depends on
      hctosys.c.
      
      [sfr@canb.auug.org.au: fix build]
      Signed-off-by: NDavid Fries <David@Fries.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c24e29e
  4. 13 3月, 2010 1 次提交
  5. 23 9月, 2009 1 次提交
  6. 28 4月, 2008 1 次提交
  7. 07 2月, 2008 1 次提交
    • D
      rtc-cmos alarm acts as oneshot · 8a0bdfd7
      David Brownell 提交于
      Start making the rtc-cmos alarm act more like a oneshot alarm by disabling
      that alarm after its IRQ fires.  (ACPI hooks are also needed.)
      
      The Linux RTC framework has previously been a bit vague in this area, but
      any other behavior is problematic and not very portable.  RTCs with full
      YYYY-MM-DD HH:MM[:SS] alarms won't have a problem here.  Only ones with
      partial match criteria, with the most visible example being the PC RTC, get
      confused.  (Because the criteria will match repeatedly.)
      
      Update comments relating to that oneshot behavior and timezone handling.
      (Timezones are another issue that's mostly visible with rtc-cmos.  That's
      because PCs often dual-boot MS-Windows, which likes its RTC to match local
      wall-clock time instead of UTC.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8a0bdfd7
  8. 19 10月, 2007 1 次提交
    • J
      Add missing newlines to some uses of dev_<level> messages · 898eb71c
      Joe Perches 提交于
      Found these while looking at printk uses.
      
      Add missing newlines to dev_<level> uses
      Add missing KERN_<level> prefixes to multiline dev_<level>s
      Fixed a wierd->weird spelling typo
      Added a newline to a printk
      Signed-off-by: NJoe Perches <joe@perches.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Mark M. Hoffman <mhoffman@lightlink.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: James Smart <James.Smart@Emulex.Com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      898eb71c
  9. 17 10月, 2007 1 次提交
  10. 09 5月, 2007 3 次提交
  11. 13 2月, 2007 1 次提交
    • D
      [PATCH] RTC gets sysfs wakealarm attribute · 3925a5ce
      David Brownell 提交于
      This adds a new "wakealarm" sysfs attribute to RTC class devices which support
      alarm operations and are wakeup-capable:
      
       - It reads as either empty, or the scheduled alarm time as seconds
         since the POSIX epoch.  (That time may already have passed, since
         nothing currently enforces one-shot alarm semantics.)
      
       - It can be written with an alarm time in the future, again seconds
         since the POSIX epoch, which enables the alarm.
      
       - It can be written with an alarm time not in the future (such as 0,
         the start of the POSIX epoch) to disable the alarm.
      
      Usage examples (some need GNU date) after "cd /sys/class/rtc/rtcN":
      
          alarm after 10 minutes:
      	# echo $(( $(cat since_epoch) + 10 * 60 )) > wakealarm
          alarm tuesday evening 10pm:
      	# date -d '10pm tuesday' "+%s" > wakealarm
          disable alarm:
          	# echo 0 > wakealarm
      
      This resembles the /proc/acpi/alarm file in that nothing happens when the
      alarm triggers ...  except possibly waking the system from sleep.  It's also
      like that in a nasty way: not much can be done to prevent one task from
      clobbering another task's alarm settings.
      
      It differs from that file in that there's no in-kernel date parser.
      
      Note that a few RTCs ignore rtc_wkalrm.enabled when setting alarms, or aren't
      set up correctly, so they won't yet behave with this attribute.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3925a5ce
  12. 27 1月, 2007 1 次提交
  13. 14 12月, 2006 1 次提交
  14. 02 10月, 2006 1 次提交
  15. 01 10月, 2006 1 次提交
  16. 28 3月, 2006 1 次提交