26 Jan, 2020

1 commit

  • The IRQ_NOAUTOEN flag tells interrupt core that interrupt shall not be
    auto-enabled at the time of requesting interrupt. This is a minor clean-up
    change that doesn't fix any problems.

    Signed-off-by: Dmitry Osipenko
    Link: https://lore.kernel.org/r/20200106015615.12602-1-digetx@gmail.com
    Signed-off-by: Alexandre Belloni

    Dmitry Osipenko
     

21 Aug, 2019

1 commit

  • The RTC core now has error messages in case of registration failure, there
    is no need to have other messages in the drivers.

    Signed-off-by: Alexandre Belloni
    Link: https://lore.kernel.org/r/20190818220041.17833-2-alexandre.belloni@bootlin.com
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

18 May, 2018

2 commits

  • Let the core handle offsetting and windowing the RTC range.

    The RTC has a 40-bit counter counting at 1024 Hz. So its maximum value is
    2^(40-10) - 1. Also, let the core handle the offset instead of coding it in
    the callbacks. Keep the default epoch at the beginning of 2009 (this will
    fail in 2043).

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • The probe function is not allowed to fail after the RTC is registered
    because the following may happen:

    CPU0: CPU1:
    sys_load_module()
    do_init_module()
    do_one_initcall()
    cmos_do_probe()
    rtc_device_register()
    __register_chrdev()
    cdev->owner = struct module*
    open("/dev/rtc0")
    rtc_device_unregister()
    module_put()
    free_module()
    module_free(mod->module_core)
    /* struct module *module is now
    freed */
    chrdev_open()
    spin_lock(cdev_lock)
    cdev_get()
    try_module_get()
    module_is_live()
    /* dereferences already
    freed struct module* */

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

04 May, 2018

1 commit

  • The tps6586x use a 64-bit 'epoch_start' value, but then computes that
    value using an 'mktime()', which has a smaller range and overflows
    in 2106 at the latest. As both the hardware and the subsystem interface
    support wider than 32-bit ranges for rtc times here, let's change all
    the operations on 'seconds' to time64_t.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Alexandre Belloni

    Arnd Bergmann
     

01 Mar, 2018

1 commit


21 May, 2016

1 commit

  • This module is loaded by the related mfd driver which has
    the needed MODULE_DEVICE_TABLE(i2c,...).

    This patch fix the modalias when the rtc driver is built
    as a module, so the right name is used.
    Everything operates correctly when this module is builtin.

    Fixes: esdc59ed3865 ("rtc: add RTC driver for TPS6586x")
    Signed-off-by: Nicolas Chauvet
    Signed-off-by: Alexandre Belloni

    Nicolas Chauvet
     

15 Mar, 2016

1 commit

  • tps6586x RTC IRQ is nested threaded and wired to the tps6586x inerrupt
    controller. So, this flag is not required for nested irqs anymore,
    since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs
    over system suspend") was merged.

    Cc: Alessandro Zummo
    Cc: Alexandre Belloni
    Cc: Lee Jones
    Cc: Nishanth Menon
    Cc: Laxman Dewangan
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Alexandre Belloni

    Grygorii Strashko
     

20 Oct, 2014

1 commit


13 Jun, 2013

1 commit

  • Use device_init_wakeup() instead of device_set_wakeup_capable() and move
    it before rtc dev registering. This fixes alarmtimer not registered
    when tps6586x rtc is the only wakeup compatible rtc in the system.

    Signed-off-by: Dmitry Osipenko
    Cc: Laxman Dewangan
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Osipenko
     

30 Apr, 2013

3 commits


22 Feb, 2013

1 commit


05 Jan, 2013

1 commit

  • Add an RTC driver for TPS6586X chips by TI. This driver supports:

    - Setting and getting time and date.
    - Setting and reading alarm time.
    - Alarm and interrupt functionlity.

    [akpm@linux-foundation.org: remove stray semicolons]
    [akpm@linux-foundation.org: start epoch in 2009]
    Signed-off-by: Laxman Dewangan
    Tested-by: Marc Dietrich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laxman Dewangan