1. 05 7月, 2008 2 次提交
    • M
      rtc-x1205: Fix alarm set · 471d47e3
      Michael Hamel 提交于
      I have discovered that the current version of rtc-x1205.c does not work
      correctly when asked to set the alarm time by the RTC_WKALM_SET ioctl()
      call.  This happens because the alarm registers do not behave like the
      current-time registers.  They are non-volatile.  Two things go wrong:
      
      - the X1205 requires a 10 msec delay after any attempt to write to the
        non-volatile registers.  The x1205_set_datetime() routine does the write
        as 8 single-byte writes without any delay.  Only the first write
        succeeds.  The second is NAKed because the chip is busy.
      
      - the X1205 resets the RWEL bit after any write to the non-volatile
        registers.  This would lock out any further writes after the first even
        with a 10msec delay.
      
      I fix this by doing a single 8-byte write and then waiting 10msec for the
      chip to be ready.  A side effect of this change is that it will speed up
      x1205_rtc_set_time() which uses the same code.
      
      I have also implemented the 'enable' bit in the rtc_wkalm structure, which
      the existing driver does not attempt to do.  I have modified both
      x1205_rtc_set_alarm() to set the AL0E bit, and x1205_rtc_read_alarm() to
      return it.
      
      I have tested this patch on a LinkSys NSLU2 under OpenWRT, but on no other
      hardware.  On the NSLU2 the X1205 correctly asserts its IRQ pin when the
      alarm time matches the current time.
      
      [akpm@linux-foundation.org: clean up over-parenthesisation]
      Signed-off-by: NMichael Hamel <mhamel@adi.co.nz>
      Signed-off-by: NAlessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      471d47e3
    • D
      rtc: rtc_read_alarm() handles wraparound · a01cc657
      David Brownell 提交于
      While 0e36a9a4 ("rtc: fix readback from
      /sys/class/rtc/rtc?/wakealarm") made sure that active alarms were never
      returned with invalid "wildcard" fields (negative), it can still report
      (wrongly) that the alarm triggers in the past.
      
      Example, if it's now 10am, an alarm firing at 5am will be triggered
      TOMORROW not today.  (Which may also be next month or next year...)
      
      This updates that alarm handling in three ways:
      
        * Handle alarm rollover in the common cases of RTCs that don't
          support matching on all date fields.
      
        * Skip the invalid-field logic when it's not needed.
      
        * Minor bugfix ... tm_isdst should be ignored, it's one of the
          fields Linux doesn't maintain.
      
      A warning is emitted for some of the unhandled rollover cases, but the
      possible combinations are a bit too numerous to handle every bit of
      potential hardware and firmware braindamage.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Mark Lord <lkml@rtr.ca>
      Acked-by: NAlessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a01cc657
  2. 22 6月, 2008 1 次提交
  3. 13 6月, 2008 3 次提交
  4. 07 6月, 2008 2 次提交
  5. 13 5月, 2008 3 次提交
  6. 12 5月, 2008 1 次提交
    • J
      i2c: Match dummy devices by type · 60b129d7
      Jean Delvare 提交于
      As the old driver_name/type matching scheme is going away soon, change
      the dummy device mechanism to use the new matching scheme.
      
      This has the downside that dummy i2c clients can no longer choose
      their name, they'll all appear as "dummy" in sysfs and in log
      messages. I don't think it is a problem in practice though, as there
      is little reason to use these i2c clients to log messages.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      60b129d7
  7. 09 5月, 2008 1 次提交
  8. 08 5月, 2008 1 次提交
  9. 30 4月, 2008 2 次提交
    • J
      i2c: Convert most new-style drivers to use module aliasing · 3760f736
      Jean Delvare 提交于
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      Update most new-style i2c drivers to use standard module aliasing
      instead of the old driver_name/type driver matching scheme. I've
      left the video drivers apart (except for SoC camera drivers) as
      they're a bit more diffcult to deal with, they'll have their own
      patch later.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Jochen Friedrich <jochen@scram.de>
      3760f736
    • J
      i2c: Add support for device alias names · d2653e92
      Jean Delvare 提交于
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      This patch allows new-style i2c chip drivers to have alias names using
      the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
      point, the old i2c driver binding scheme (driver_name/type) is still
      supported.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Jochen Friedrich <jochen@scram.de>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      d2653e92
  10. 29 4月, 2008 3 次提交
  11. 28 4月, 2008 10 次提交
  12. 19 4月, 2008 1 次提交
  13. 16 4月, 2008 1 次提交
  14. 11 4月, 2008 2 次提交
  15. 20 3月, 2008 2 次提交
  16. 05 3月, 2008 1 次提交
  17. 24 2月, 2008 1 次提交
  18. 10 2月, 2008 1 次提交
  19. 07 2月, 2008 2 次提交
    • D
      rtc: at91sam9 RTC support (RTT and/or RTC) · 4cdf854f
      David Brownell 提交于
      AT91sam9 RTC support, primarily in the form of an RTT-as-RTC driver that was
      extracted from 2.6.23-at91 patch and updated:
      
       - Relies on now-merged platform updates, which associate the RTT
         hardware address with each RTT and use the "at91_rtt" name.
      
       - RTC framework related fixes and cleanups, notably:
          * removed now-needless suspend/resume clock offset logic
          * alarm read/write now respects the "enabled" flag
          * suspend always disables update irqs
          * shutdown (and startup) disables all irqs
      
       - Misc cleanup:
          * use dev_*() messaging
          * add comments
          * remove globals,
          * ... etc
      
       - Don't force use of RTT0 and GPBR0.  Either resource may need
         to be used for other purposes (like NO_HZ support).
      
       - Update "AT91RM9200 RTC" Kconfig to allow it on SAM9RL chips
         (it has both RTT and RTC).
      
      Driver binding uses bus_find_device() to avoid needing any kind of "timer
      library" code when there's more than one RTT module.  (This timer can be used
      as an RTC, to support NO_HZ operation, or potentially for other stuff.  The
      choice is a per-system policy.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Michel Benoit <murpme@gmail.com>
      Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4cdf854f
    • D
      rtc: remove more dev->power.power_state usage · f618258a
      David Brownell 提交于
      Remove some more references to dev->power.power_state.  That field is overdue
      for removal, but we can't do that while it's still referenced in the kernel.
      The only reason to update it was to make the /sys/devices/.../power/state
      files (now removed) work better.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      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>
      f618258a