20 May, 2016

1 commit

  • The RTC core handles it since 6610e08 (RTC: Rework RTC code to use
    timerqueue for events). So far, only the callbacks to the RTC core have
    been removed, but not the handlers. Do this now.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Alexandre Belloni

    Wolfram Sang
     

25 Jun, 2015

1 commit

  • According to C99, %2.s means 'print two spaces' (a precision of
    . without following digits or * means 0). The kernel's printf
    implementation, however, treats that case as if no precision was
    given, but relying on that quirk is rather silly. Also, since no -
    (aka left-justify) flag is given, the field with of 2 would then cause
    the alarm->enabled case to come out as "o n". Deobfuscate it.

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Alexandre Belloni

    Rasmus Villemoes
     

03 Apr, 2015

1 commit

  • This driver has a number of y2038/y2106 issues.

    This patch resolves them by:

    - Replacing rtc_time_to_tm() with rtc_time64_to_tm()
    - Changing mc13xxx_rtc_set_mmss() to use rtc_class_ops's set_mmss64()

    After this patch, the driver should not have any remaining
    y2038/y2106 issues.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-11-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     

20 Oct, 2014

1 commit


04 Apr, 2014

7 commits

  • RTC drivers must not return an error after device registration. This
    patch makes RTC registration as the last action.

    Signed-off-by: Alexander Shiyan
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Remove unnecessary locks when reading the time and make the read
    operation until the values of day matched between reading the seconds,
    it will make the mc13xxx_rtc_read_time() procedure more readable.
    Additionally, patch introduced a "seconds in a day" definition.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Datasheet says: "When the VSRTC voltage drops to the range of 0.9 - 0.8V,
    the RTCPORB reset signal is generated and the contents of the RTC will
    be reset. . To inform the processor that the contents of the RTC
    are no longer valid due to the reset, a timer reset interrupt function
    is implemented with the RTCRSTI bit." This patch makes the RTC valid by
    default until RTCRST interrupt occurs.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • 1Hz interrupt is never unmasked, so no interrupts appears. This patch
    fix this issue.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • This patch removes excess layer for alarm_irq_enable() function.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Interrupts can appear after request_irq and interrupt handlers can use
    the RTC device, but currently we register RTC after IRQs. This patch
    changes this order and simplify error path a bit.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Since we no longer allow building without hotplug, the
    mc13xxx_rtc_remove() function is always present and we should not use
    __exit_p() to refer to it.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     

04 Jul, 2013

1 commit

  • The driver core clears the driver data to NULL after device_release or
    on probe failure, since commit 0998d063100 ("device-core: Ensure drvdata
    = NULL when no driver is bound"). Thus, it is not needed to manually
    clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     

30 Apr, 2013

2 commits


31 Jul, 2012

2 commits


11 Jan, 2012

1 commit


03 Nov, 2011

1 commit


07 May, 2011

1 commit

  • Since commit f44f7f9 (RTC: Initialize kernel state from RTC)
    rtc_device_register reads the programmed alarm. As reading the alarm
    needs to take the mc13xxx lock, release it before calling
    rtc_device_register.

    This fixes a deadlock during boot:

    INFO: task swapper:1 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    swapper D c02b175c 0 1 0 0x00000000
    [] (schedule+0x304/0x4f4) from [] (__mutex_lock_slowpath+0x7c/0x110)
    [] (__mutex_lock_slowpath+0x7c/0x110) from [] (mc13xxx_rtc_read_time+0x1c/0x118)
    [] (mc13xxx_rtc_read_time+0x1c/0x118) from [] (__rtc_read_time+0x58/0x5c)
    [] (__rtc_read_time+0x58/0x5c) from [] (rtc_read_time+0x30/0x48)
    [] (rtc_read_time+0x30/0x48) from [] (__rtc_read_alarm+0x1c/0x290)
    [] (__rtc_read_alarm+0x1c/0x290) from [] (rtc_device_register+0x150/0x27c)
    [] (rtc_device_register+0x150/0x27c) from [] (mc13xxx_rtc_probe+0x128/0x17c)
    [] (mc13xxx_rtc_probe+0x128/0x17c) from [] (platform_drv_probe+0x1c/0x24)
    [] (platform_drv_probe+0x1c/0x24) from [] (driver_probe_device+0x80/0x1a8)
    [] (driver_probe_device+0x80/0x1a8) from [] (__driver_attach+0x8c/0x90)
    [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x8c)
    [] (bus_for_each_dev+0x60/0x8c) from [] (bus_add_driver+0x180/0x248)
    [] (bus_add_driver+0x180/0x248) from [] (driver_register+0x70/0x15c)
    [] (driver_register+0x70/0x15c) from [] (platform_driver_probe+0x18/0x98)
    [] (platform_driver_probe+0x18/0x98) from [] (do_one_initcall+0x2c/0x168)
    [] (do_one_initcall+0x2c/0x168) from [] (kernel_init+0xa0/0x150)
    [] (kernel_init+0xa0/0x150) from [] (kernel_thread_exit+0x0/0x8)

    Reported-by: Vagrant Cascadian
    Signed-off-by: Uwe Kleine-König
    Closes: http://bugs.debian.org/625804
    [Tweaked commit log -jstultz]
    Signed-off-by: John Stultz

    Uwe Kleine-König
     

15 Apr, 2011

1 commit


10 Mar, 2011

1 commit

  • Now that the generic code handles UIE mode irqs via periodic
    alarm interrupts, no one calls the
    rtc_class_ops->update_irq_enable() method anymore.

    This patch removes the driver hooks and implementations of
    update_irq_enable if no one else is calling it.

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

    John Stultz
     

29 Oct, 2010

1 commit

  • The mfd driver for MC13783 recently got support for MC13892 and was
    renamed accordingly from mc13783-core to mc13xxx-core. Do the same for
    rtc-mc13783.

    The only relevant change is to use platform id's to tell the platform bus
    that this driver is responsible for mc13892-rtc devices, too.

    Acked-by: Alessandro Zummo
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Samuel Ortiz

    Uwe Kleine-König