11 Jan, 2012

1 commit

  • This patch converts the drivers in drivers/rtc/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Signed-off-by: Axel Lin
    Acked-by: Mark Brown
    Acked-by: Mike Frysinger
    Acked-by: Guan Xuetao
    Acked-by: Linus Walleij
    Acked-by: Haojian Zhuang
    Cc: Alessandro Zummo
    Cc: Srinidhi Kasagar
    Cc: Lars-Peter Clausen
    Cc: Ben Dooks
    Cc: John Stultz
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

23 Dec, 2011

1 commit


09 Dec, 2011

1 commit


15 Sep, 2011

1 commit

  • The driver does not generate an alarm interrupt even though a time for
    an alarm is set.

    This results from disabling rtc_clk after setting the alarm time.

    To generate an alarm interrupt the driver should maintain its enabled
    state for rtc_clk the until alarm interrupt occurs. This patch permits
    generation of an alarm interrupt.

    [akpm@linux-foundation.org: make s3c_rtc_alarm_clk_lock local to s3c_rtc_alarm_clk_enable()]
    Signed-off-by: Donggeun Kim
    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     

26 Aug, 2011

2 commits

  • The previous rtc-s3c had two issues related with its IRQ.

    1. Users cannot open rtc multiple times because an open operation
    calls request_irq on the same IRQ. (e.g., two user processes wants to
    open and read RTC time from rtc-s3c at the same time)

    2. If alarm is set and no one has the rtc opened with filesystem
    (either the alarm is set by kernel/boot-loader or user set an alarm and
    closed rtc dev file), the pending bit is not cleared and no further
    interrupt is invoked. When the alarm is used by the system itself such
    as a resume from suspend-to-RAM or other Low-power modes/idle, this is
    a critical issue.

    This patch mitigates these issues by calling request_irq at probe and
    free_irq at remove.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Kukjin Kim
    Cc: Alessandro Zummo
    Cc: Changhwan Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    MyungJoo Ham
     
  • RTC-S3C used to print out debug messages incorrectly. This patch
    corrects incorrect outputs. (undecoded bcd numbers, incorrectly decoded
    register values)

    This patch affects the pr-debug messages only.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Kukjin Kim
    Cc: Alessandro Zummo
    Cc: Changhwan Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    MyungJoo Ham
     

26 Jul, 2011

2 commits

  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • Add support for clock gating. Power consumption can be reduced by setting
    rtc_clk disabled state except for when RTC related registers are accessed.

    Signed-off-by: Donggeun Kim
    Signed-off-by: MyungJoo Ham
    Signed-off-by: KyungMin Park
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     

10 Jun, 2011

1 commit


12 May, 2011

1 commit

  • The driver is not balancing set_irq and disable_irq_wake() calls, so
    ensure that it keeps track of whether the wake is enabled.

    The fixes the following error on S3C6410 devices:

    WARNING: at kernel/irq/manage.c:382 set_irq_wake+0x84/0xec()
    Unbalanced IRQ 92 wake disable

    Signed-off-by: Ben Dooks
    Signed-off-by: Mark Brown
    Cc: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

30 Mar, 2011

1 commit

  • s3c_rtc_setpie was removed, and it resulted in compiler error:

    drivers/rtc/rtc-s3c.c: In function s3c_rtc_release
    drivers/rtc/rtc-s3c.c:339:2: error: implicit declaration of function
    s3c_rtc_setpie

    Fix it by removing s3c_rtc_release calls.

    [jstultz: An identical fix was also sent in by Jiri Pinkava
    ]

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    Signed-off-by: Vasily Khoruzhick
    Signed-off-by: John Stultz

    Vasily Khoruzhick
     

10 Mar, 2011

2 commits

  • With the generic rtc code now emulating PIE mode irqs via an
    hrtimer, no one calls the rtc_class_ops->irq_set_freq call.

    This patch removes the hook and deletes the driver functions
    if no one else calls them.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     
  • With PIE mode interrupts now emulated in generic code via an hrtimer,
    no one calls rtc_class_ops->irq_set_state(), so this patch removes it
    along with driver implementations.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     

05 Mar, 2011

1 commit

  • Fix s3c_rtc_setaie() prototype to eliminate the following compile
    warning:

    drivers/rtc/rtc-s3c.c:383: warning: initialization from incompatible pointer type

    (akpm: the rtc_class_ops.alarm_irq_enable() handler is being passed two
    arguments where it expects just one, presumably with undesired effects)

    Signed-off-by: Axel Lin
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

28 Oct, 2010

6 commits

  • Add "rtc_valid_tm" in s3c_rtc_gettime() as per Wan ZongShun's suggestion.

    Suggested-by: Wan ZongShun
    Signed-off-by: Kukjin Kim
    Cc: Ben Dooks
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kukjin Kim
     
  • Change RTC initialization method in probe(). The 'rtc_valid_tm(tm)' can
    check whether RTC BCD is valid or not. And change the method of checking
    because the previous method cannot validate RTC BCD registers properly.

    Signed-off-by: Changhwan Youn
    Signed-off-by: Kukjin Kim
    Cc: Ben Dooks
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changhwan Youn
     
  • Fix debug message format.

    Signed-off-by: Kukjin Kim
    Acked-by: Ben Dooks
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kukjin Kim
     
  • The alarm_irq_enable function should be implemented to support RTC alarm.
    And fix tabs instead of white space around the proc field.

    Signed-off-by: Changhwan Youn
    Signed-off-by: Kukjin Kim
    Acked-by: Ben Dooks
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changhwan Youn
     
  • Current s3c_rtc_getalarm() sets missing field of alarm time with 0xff.
    But this value should be -1 according to drivers/rtc/interface.c.

    Signed-off-by: Changhwan Youn
    Signed-off-by: Kukjin Kim
    Acked-by: Ben Dooks
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changhwan Youn
     
  • S3C2410_RTCCON of TYPE_S3C64XX RTC should be read/written by readw and
    writew, because TYPE_S3C64XX RTC uses bit 8 and 9. And TYPE_S3C2410 RTC
    also can access it by readw and writew.

    [atul.dahiya@samsung.com: tested on smdk2416]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Changhwan Youn
    Signed-off-by: Kukjin Kim
    Tested-by: Atul Dahiya
    Cc: Ben Dooks
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changhwan Youn
     

23 Sep, 2010

1 commit

  • This change resolves a problem about unbalanced calls of
    enable_irq_wakeup() and disable_irq_wakeup() for alarm interrupt.

    Bug reproduction:

    root@eb600:~# echo 0 > /sys/class/rtc/rtc0/wakealarm

    WARNING: at kernel/irq/manage.c:361 set_irq_wake+0x7c/0xe4()
    Unbalanced IRQ 46 wake disable
    Modules linked in:
    [] (unwind_backtrace+0x0/0xd8) from [] (warn_slowpath_common+0x44/0x5c)
    [] (warn_slowpath_common+0x44/0x5c) from [] (warn_slowpath_fmt+0x24/0x30)
    [] (warn_slowpath_fmt+0x24/0x30) from [] (set_irq_wake+0x7c/0xe4)
    [] (set_irq_wake+0x7c/0xe4) from [] (s3c_rtc_setalarm+0xa8/0xb8)
    [] (s3c_rtc_setalarm+0xa8/0xb8) from [] (rtc_set_alarm+0x60/0x74)
    [] (rtc_set_alarm+0x60/0x74) from [] (rtc_sysfs_set_wakealarm+0xc8/0xd8)
    [] (rtc_sysfs_set_wakealarm+0xc8/0xd8) from [] (dev_attr_store+0x20/0x24)
    [] (dev_attr_store+0x20/0x24) from [] (sysfs_write_file+0x104/0x13c)
    [] (sysfs_write_file+0x104/0x13c) from [] (vfs_write+0xb0/0x158)
    [] (vfs_write+0xb0/0x158) from [] (sys_write+0x3c/0x68)
    [] (sys_write+0x3c/0x68) from [] (ret_fast_syscall+0x0/0x28)

    Signed-off-by: Vladimir Zapolskiy
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Cc: Atul Dahiya
    Cc: Taekgyun Ko
    Cc: Kukjin Kim
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vladimir Zapolskiy
     

05 Aug, 2010

3 commits


05 Jun, 2010

2 commits


25 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

07 Jan, 2009

1 commit

  • Move the power of 2 check on frequencies down into individual rtc drivers

    This is to allow for non power of 2 real time clock periodic interrupts
    such as those on the pxa27x to be found in the new pxa27x-rtc driver

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

    Jonathan Cameron
     

03 Nov, 2008

1 commit


31 Oct, 2008

2 commits

  • tAdd adds device_init_wakeup() ivokation to probe function of
    s3c2410_rtc_driver. Without of this wakealarm sysfs attribute does not
    initialise.

    Signed-off-by: Yauhen Kharuzhy
    Acked-by: Ben Dooks
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yauhen Kharuzhy
     
  • Warnings was appeared when compile rtc-s3c.c because
    platform_driver structure s3c2410_rtcdrv has wrong name.

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

    Yauhen Kharuzhy
     

30 Oct, 2008

1 commit


20 Oct, 2008

1 commit

  • Change drivers/rtc/ to use the new bcd2bin/bin2bcd functions instead of
    the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

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

    Adrian Bunk
     

07 Aug, 2008

2 commits


25 Jul, 2008

2 commits

  • The rtc-s3c.c driver has been using its own ioctl() handling to deal with
    alarm and periodic interrupts to handle what should now be done with the
    rtc core code.

    Change to using the .irq_set_freq and .irq_set_state driver entries and
    remove the .ioctl handling.

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

    Ben Dooks
     
  • Add the relevant __devinit and __devexit attributes to the rtc-s3c driver.

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

    Ben Dooks
     

22 May, 2008

2 commits

  • On ARM, asm/rtc.h only contains definitions for the predecessor to
    the RTC class support. RTC class drivers should not be including
    this include.

    Build tested on at91sam9rl and s3c2410 configurations.

    Acked-by: Alessandro Zummo
    Signed-off-by: Russell King

    Russell King
     
  • asm/mach/time.h is the ARM header file for setting up kernel ticker
    timekeeping (be that the old jiffy interrupt or the new clocksource.)
    RTC drivers have no business using this header file, and in fact do
    not require it.

    Build tested on at91sam9rl, omap and s3c2410 configurations.

    Acked-by: Alessandro Zummo
    Acked-by: Andrew Victor
    Signed-off-by: Russell King

    Russell King