17 Oct, 2007

1 commit

  • Add kernel/kernel and kernel/user locking for the periodic irq feature of
    the rtc class.

    PIE ioctls are also supported.

    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     

26 Jul, 2007

1 commit

  • This avoids use of the kernel-internal "xtime" variable directly outside
    of the actual time-related functions. Instead, use the helper functions
    that we already have available to us.

    This doesn't actually change any behaviour, but this will allow us to
    fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
    (because much of the realtime information is maintained as separate
    offsets to 'xtime'), which has caused interfaces that use xtime directly
    to get a time that is out of sync with the real-time clock by up to a
    third of a second or so.

    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    john stultz
     

09 May, 2007

6 commits

  • Fix a goof in the revised classdev support for RTCs: make sure the /dev
    node info is ready before the device is registered, not after. Otherwise
    the /sys/class/rtc/rtcN/dev attribute won't be created and then udev won't
    have the information it needs to create the /dev/rtcN node.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • RTC class suspend/resume support, re-initializing the system clock on resume
    from the clock used to initialize it at boot time.

    - The reinit-on-resume is hooked to the existing RTC_HCTOSYS config
    option, on the grounds that a clock good enough for init must also
    be good enough for re-init.

    - Inlining a version of the code used by ARM, to save and restore the
    delta between a selected RTC and the current system wall-clock time.

    - Removes calls to that ARM code from AT91, OMAP1, and S3C RTCs. This
    means that systems using those RTCs across suspend/resume will likely
    want to change their kernel configs to enable RTC_HCTOSYS.

    If HCTOSYS isn't using a second RTC (with battery?), this changes the
    system's initial date from Jan 1970 to the epoch this hardware uses:
    1998 for AT91, 2000 for OMAP1 (assuming no split power mode), etc.

    This goes on top of the patch series removing "struct class_device" usage
    from the RTC framework. That's all needed for class suspend()/resume().

    Signed-off-by: David Brownell
    Acked-by: Greg Kroah-Hartman
    Acked-By: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Finish converting the RTC framework so it no longer uses class_device.

    Signed-off-by: David Brownell
    Acked-by: Greg Kroah-Hartman
    Acked-By: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This simplifies the RTC procfs support by removing the class_interface that
    hooks it into the rtc core. If it's configured, then sysfs support is now
    part of the RTC core, and is never a separate module.

    It also removes the class_interface hook, now that its last remaining user is
    gone. (That API is usable only with a "struct class_device".)

    It's another step towards being able to remove "struct class_device".

    Signed-off-by: David Brownell
    Acked-by: Greg Kroah-Hartman
    Acked-By: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This simplifies the RTC sysfs support by removing the class_interface that
    hooks it into the rtc core. If it's configured, then sysfs support is now
    part of the RTC core, and is never a separate module.

    It's another step towards being able to remove "struct class_device".

    Signed-off-by: David Brownell
    Acked-by: Greg Kroah-Hartman
    Acked-By: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This simplifies the /dev support by removing a superfluous class_device (the
    /sys/class/rtc-dev stuff) and the class_interface that hooks it into the rtc
    core. Accordingly, if it's configured then /dev support is now part of the
    RTC core, and is never a separate module.

    It's another step towards being able to remove "struct class_device".

    [bunk@stusta.de: drivers/rtc/rtc-dev.c should #include "rtc-core.h"]
    Signed-off-by: David Brownell
    Acked-by: Greg Kroah-Hartman
    Acked-By: Alessandro Zummo
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

02 Mar, 2007

1 commit

  • Fix an oops on the rtc_device_unregister() path by waiting until the last
    moment before nulling the rtc->ops vector. Fix some potential oopses by
    having the rtc_class_open()/rtc_class_close() interface increase the RTC's
    reference count while an RTC handle is available outside the RTC framework.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

01 Oct, 2006

2 commits

  • Update RTC framework so that drivers can constify their method tables, moving
    them from ".data" to ".rodata". Then update the drivers.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This makes RTC core components use "subsys_init" instead of "module_init", as
    appropriate for subsystem infrastructure. This is mostly useful for
    statically linking drivers in other parts of the tree that may provide an RTC
    interface as a secondary functionality (e.g. part of a multifunction chip);
    they won't need to worry so much about drivers/Makefile link order.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Acked-by: Oleg Verych
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

28 Jun, 2006

1 commit

  • We need to serialize access to the global rtc_idr even in this error path.

    Signed-off-by: Sonny Rao
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sonny Rao
     

26 Jun, 2006

1 commit


11 Apr, 2006

1 commit


28 Mar, 2006

1 commit

  • Add the basic RTC subsystem infrastructure to the kernel.

    rtc/class.c - registration facilities for RTC drivers
    rtc/interface.c - kernel/rtc interface functions
    rtc/hctosys.c - snippet of code that copies hw clock to sw clock
    at bootup, if configured to do so.

    Signed-off-by: Alessandro Zummo
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo