31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

04 Sep, 2017

1 commit

  • include/linux/i2c is not for client devices. Move the header file to a
    more appropriate location.

    Signed-off-by: Wolfram Sang
    Acked-by: Greg Kroah-Hartman
    Acked-by: Alexandre Belloni
    Acked-by: Mark Brown
    Acked-by: Sebastian Reichel
    Acked-by: Jonathan Cameron
    Acked-by: Dmitry Torokhov
    Acked-by: Kishon Vijay Abraham I
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Thierry Reding
    Acked-by: Tony Lindgren
    Acked-by: Daniel Thompson
    Acked-by: Linus Walleij
    Acked-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Wolfram Sang
     

01 Dec, 2016

2 commits

  • Since there are no platform based users and all users
    of this code are TI OMAP-based which is DT only, it makes
    sense to remove unused code.

    Signed-off-by: Nicolae Rosia
    Tested-by: Tony Lindgren
    Signed-off-by: Alexandre Belloni

    Nicolae Rosia
     
  • The current code uses static variables which prevent
    the use of multiple rtc twl instances.
    We also make it clear that this driver supports only
    TWL4030 and TWL6030 classes.

    Signed-off-by: Nicolae Rosia
    Tested-by: Tony Lindgren
    Signed-off-by: Alexandre Belloni

    Nicolae Rosia
     

02 Sep, 2016

1 commit

  • Check for rtc_class_ops structures that are only passed to
    devm_rtc_device_register, rtc_device_register,
    platform_device_register_data, all of which declare the corresponding
    parameter as const. Declare rtc_class_ops structures that have these
    properties as const.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct rtc_class_ops i@p = { ... };

    @ok@
    identifier r.i;
    expression e1,e2,e3,e4;
    position p;
    @@
    (
    devm_rtc_device_register(e1,e2,&i@p,e3)
    |
    rtc_device_register(e1,e2,&i@p,e3)
    |
    platform_device_register_data(e1,e2,e3,&i@p,e4)
    )

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct rtc_class_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Baruch Siach
    Acked-by: Hans Ulli Kroll
    Acked-by: Linus Walleij
    Acked-by: Thierry Reding
    Signed-off-by: Alexandre Belloni

    Julia Lawall
     

17 Apr, 2015

1 commit

  • Neaten the logging a bit by adding #define pr_fmt

    Miscellanea:

    o Remove __FILE__/__func__ uses
    o Coalesce formats adding missing spaces
    o Align arguments
    o (rtc-cmos) Integrated 2 consecutive messages

    Signed-off-by: Joe Perches
    Acked-by: Alexandre Belloni
    Cc: Alessandro Zummo
    Cc: Joshua Kinard
    Cc: Chanwoo Choi
    Reviewed-by: Krzysztof Kozlowski
    Tested-by: Krzysztof Kozlowski
    Cc: Aaro Koskinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

20 Oct, 2014

1 commit


24 Jan, 2014

1 commit


01 Aug, 2013

1 commit


04 Jul, 2013

4 commits

  • Use module_platform_driver() to register the platform driver.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Kevin Hilman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Ujfalusi
     
  • Initialize the rtc_reg_map in platform_driver's probe function instead at
    module_init time. This way we can make sure that the twl-core has been
    already probed and initialized (twl_priv->twl_id is valid) since the
    platform device for the RTC driver will be created by the twl-core after
    it finished its init.

    Reported-by: Christoph Fritz
    Signed-off-by: Peter Ujfalusi
    Tested-by: Kevin Hilman
    Tested-by: Grygorii Strashko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Ujfalusi
     
  • Currently, the RTC IRQ is never wakeup-enabled so is not capable of
    bringing the system out of suspend.

    On OMAP platforms, we have gotten by without this because the TWL RTC is
    on an I2C-connected chip which is capable of waking up the OMAP via the IO
    ring when the OMAP is in low-power states.

    However, if the OMAP suspends without hitting the low-power states (and
    the IO ring is not enabled), RTC wakeups will not work because the IRQ is
    not wakeup enabled.

    To fix, ensure the RTC IRQ is wakeup enabled whenever the RTC alarm is
    set.

    Signed-off-by: Kevin Hilman
    Cc: Alessandro Zummo
    Cc: Tony Lindgren
    Cc: Grygorii Strashko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Hilman
     
  • 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
     

13 Jun, 2013

1 commit

  • When booted in legacy mode device_init_wakeup() gets called by
    drivers/mfd/twl-core.c when the children are initialized. However, when
    booted using device tree, the children are created with
    of_platform_populate() instead add_children().

    This means that the RTC driver will not have device_init_wakeup() set,
    and we need to call it from the driver probe like RTC drivers typically
    do.

    Without this we cannot test PM wake-up events on omaps for cases where
    there may not be any physical wake-up event.

    Signed-off-by: Tony Lindgren
    Reported-by: Kevin Hilman
    Cc: Alessandro Zummo
    Cc: Jingoo Han
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Lindgren
     

30 Apr, 2013

1 commit


22 Feb, 2013

1 commit

  • This eliminates having an #ifdef returning NULL for the case when OF is
    disabled. Maintains consistency in cases where OF is always selected.

    Signed-off-by: Sachin Kamat
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sachin Kamat
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Alessandro Zummo
    Cc: Srinidhi Kasagar
    Cc: Linus Walleij
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Guan Xuetao
    Cc: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

21 Nov, 2012

1 commit


18 Sep, 2012

1 commit

  • On some platforms, bootloaders are known to do some interesting RTC
    programming. Without going into the obscurities as to why this may be
    the case, suffice it to say the the driver should not make any
    assumptions about the state of the RTC when the driver loads. In
    particular, the driver probe should be sure that all interrupts are
    disabled until otherwise programmed.

    This was discovered when finding bursty I2C traffic every second on
    Overo platforms. This I2C overhead was keeping the SoC from hitting
    deep power states. The cause was found to be the RTC firing every
    second on the I2C-connected TWL PMIC.

    Special thanks to Felipe Balbi for suggesting to look for a rogue driver
    as the source of the I2C traffic rather than the I2C driver itself.

    Special thanks to Steve Sakoman for helping track down the source of the
    continuous RTC interrups on the Overo boards.

    Signed-off-by: Kevin Hilman
    Cc: Felipe Balbi
    Tested-by: Steve Sakoman
    Cc: Alessandro Zummo
    Tested-by: Shubhrajyoti Datta
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Hilman
     

12 Jul, 2012

1 commit

  • Requesting a threaded interrupt without a primary handler and without
    IRQF_ONESHOT is dangerous, and after commit 1c6c6952 ("genirq: Reject
    bogus threaded irq requests"), these requests are rejected. This causes
    ->probe() to fail, and the RTC driver not to be availble.

    To fix, add IRQF_ONESHOT to the IRQ flags.

    Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake to
    wake from system suspend multiple times.

    Signed-off-by: Kevin Hilman
    Cc: Alessandro Zummo
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Hilman
     

13 Apr, 2012

1 commit

  • RTC stores time and date in several registers. Due to the fact that
    these registers can't be read instantaneously, there is a chance that
    reading from counting registers gives an error of one minute, one hour,
    one day, etc.

    To address this issue, the RTC has hardware support to copy the RTC
    counting registers to static shadowed registers. The current
    implementation does not use this feature, and in a stress test, we can
    reproduce this error at a rate of around two times per 300000 readings.

    Fix the implementation to ensure that the right snapshot of time is
    captured.

    Signed-off-by: Konstantin Shlyakhovoy
    Signed-off-by: Nishanth Menon
    Cc: Alessandro Zummo
    Cc: Benoit Cousson
    Cc: linux-omap
    Acked-by: Mykola Oleksiienko
    Acked-by: Oleksandr Dmytryshyn
    Acked-by: Graeme Gregory
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Shlyakhovoy
     

24 Mar, 2012

4 commits

  • Following changes are made as part of this change:

    1. As TWL RTC supports periodic interrupt, the correct event should be
    RTC_PF instead of RTC_UF.

    2. No need to initialize variable "events" to 0 & then OR it with the
    event values. Hence fixing it.

    Signed-off-by: Venu Byravarasu
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venu Byravarasu
     
  • For clearing RTC interrupt, programming ALARM bit only is sufficient, as
    all other bits are any way not affected by writing 0 to them.

    Hence removed unwanted OR operation.

    Signed-off-by: Venu Byravarasu
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venu Byravarasu
     
  • As part of probe, before enabling RTC, RTC_CTRL register is read to check
    if it is already running. If RTC is used by kernel alone, then this read
    is not required. Even if RTC was enabled already by boot loader, setting
    STOP_RTC bit again should not harm. Hence removed unwanted read
    operation.

    Signed-off-by: Venu Byravarasu
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venu Byravarasu
     
  • As the TWL RTC driver has a cached copy of enabled RTC interrupt bits in
    variable rtc_irq_bits, that can be checked before really setting or
    masking any of the interrupt bits.

    Signed-off-by: Venu Byravarasu
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venu Byravarasu
     

11 Jan, 2012

1 commit


27 Aug, 2011

1 commit

  • Only register as an RTC device after the hardware has been
    successfully initialized. The RTC class driver will call
    back to this driver to read a pending alarm, and other
    drivers watching for new devices on the RTC class may
    read the RTC time upon registration. Such access might
    occur while the RTC is stopped, prior to clearing
    pending alarms, etc.

    The new ordering also avoids leaving the platform
    device drvdata set to an unregistered struct rtc_device *
    on probe errors.

    Signed-off-by: Todd Poynor
    Signed-off-by: John Stultz

    Todd Poynor
     

11 Aug, 2011

2 commits


26 Jul, 2011

1 commit

  • We forget to save the return value of the call to
    twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); in 'ret', making the
    test of 'ret < 0' dead code since 'ret' then couldn't possibly have
    changed since the last test just a few lines above. It also makes us not
    detect failures from that specific twl_rtc_write_u8() call.

    Signed-off-by: Jesper Juhl
    Cc: Alessandro Zummo
    Cc: Alexandre Rusev
    Cc: "George G. Davis"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

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
     

07 Mar, 2010

1 commit

  • The C99 specification states in section 6.11.5:

    The placement of a storage-class specifier other than at the beginning of
    the declaration specifiers in a declaration is an obsolescent feature.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

14 Dec, 2009

4 commits

  • This patch adds support for RTC in phoenix TWL6030.
    Register offset addresses have changed in TWL6030
    rtc-twl.c will hence forth support all twl RTC (4030, 5030, 6030 ..)

    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Reviewed-by: Tony Lindgren
    Reviewed-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • This patch renames all twl4030_ functions to twl_ so that RTC driver can be
    shared between Triton and Phoenix.

    Signed-off-by: Balaji T K
    Signed-off-by: Nayak Rajendra
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • This patch renames function names like twl4030_i2c_write_u8,
    twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
    and also common variable in twl-core.c

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
    for OMAP3. The common modules like RTC, Regulator creates opportunity
    to re-use the most of the code from twl4030.

    This patch renames few common drivers twl4030* files to twl* to enable
    the code re-use.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Santosh Shilimkar