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
     

09 Jun, 2019

1 commit


05 Mar, 2019

3 commits


28 Aug, 2018

2 commits


01 Mar, 2018

3 commits


07 Jul, 2017

3 commits


09 Mar, 2017

1 commit

  • The driver doesn't have a struct of_device_id table but supported devices
    are registered via Device Trees. This is working on the assumption that a
    I2C device registered via OF will always match a legacy I2C device ID and
    that the MODALIAS reported will always be of the form i2c:.

    But this could change in the future so the correct approach is to have an
    OF device ID table if the devices are registered via OF.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Alexandre Belloni

    Javier Martinez Canillas
     

12 Oct, 2016

1 commit

  • There might be designs where the power supply circuit is designed
    in a way that VDETOFF and SWOFF is required to be set. Otherwise the
    RTC detects a power loss. Add a device tree interface for this.

    Signed-off-by: Carsten Resch
    Signed-off-by: Dirk Behme
    Signed-off-by: Oleksij Rempel
    Signed-off-by: Alexandre Belloni

    Oleksij Rempel
     

28 Jul, 2016

5 commits

  • V1F indicates that the time accuracy may have been compromised because
    of a voltage drop (possibly only temporary) below VLOW1, which stops the
    temperature compensation. When the time is set, the accuracy is
    restored, so V1F should be cleared in order to indicate this and to be
    able to detect the next temperature compensation loss. This is the same
    principle as for V2F, which is cleared when the time is set to indicate
    that the time is no longer invalid and to be able to detect the next
    data loss.

    Signed-off-by: Benoît Thébaudeau
    Signed-off-by: Alexandre Belloni

    Benoît Thébaudeau
     
  • According to the application manual of the RX8900, the RESET bit must be
    set to 1 to prevent a timer update while setting the time. This also
    resets the subsecond counter. The application manual of the RV-8803 does
    not mention such a requirement, and it says that the 100th Seconds
    register is cleared when writing to the Seconds register, but using the
    RESET bit for the RV-8803 too should not be an issue and is probably
    safer.

    This change also ensures that the RESET bit is initialized properly in
    all cases. Indeed, all the registers must be initialized if the voltage
    has been lower than VLOW2 (triggering V2F), but not low enough to
    trigger a POR.

    Signed-off-by: Benoît Thébaudeau
    Signed-off-by: Alexandre Belloni

    Benoît Thébaudeau
     
  • The I²C NACK issue of the RV-8803 may occur after any I²C START
    condition, depending on the timings. Consequently, the workaround must
    be applied for all the I²C transfers.

    This commit abstracts the I²C transfer code into register access
    functions. This avoids duplicating the I²C workaround everywhere. This
    also avoids the duplication of the code handling the return value of
    i2c_smbus_read_i2c_block_data(). Error messages are issued in case of
    definitive register access failures (if the workaround fails). This
    change also makes the I²C transfer return value checks consistent.

    Signed-off-by: Benoît Thébaudeau
    Signed-off-by: Alexandre Belloni

    Benoît Thébaudeau
     
  • The Weekday register is encoded as 2^tm_wday, with tm_wday in 0..6, so
    using tm_wday = ffs(reg) to fill tm_wday from the register value is
    wrong because this gives the expected value + 1. This could be fixed as
    tm_wday = ffs(reg) - 1, but tm_wday = ilog2(reg) works as well and is
    more direct.

    Signed-off-by: Benoît Thébaudeau
    Signed-off-by: Alexandre Belloni

    Benoît Thébaudeau
     
  • The RTC core always calls rtc_valid_tm() after ->read_time() in case of
    success (in __rtc_read_time()), so do not call it twice.

    Signed-off-by: Benoît Thébaudeau
    Signed-off-by: Alexandre Belloni

    Benoît Thébaudeau
     

09 Jul, 2016

1 commit


26 Jun, 2016

1 commit


25 Mar, 2016

1 commit

  • The rv8803 has a 60µs window where it will not answer on the i2c bus.
    It also means there will be no ack for the communication. Make sure
    communication is tried multiple times when this happens (the i2c subsystem
    mandates -ENXIO is that case but the number of retries is host specific).
    The critical parts are the probe function and the alarm callback so make
    sure we handle the failure there.

    Cc: stable@vger.kernel.org # v4.4
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

15 Mar, 2016

1 commit


12 Jan, 2016

2 commits


08 Nov, 2015

1 commit