04 Apr, 2019

1 commit


18 Mar, 2019

1 commit


31 Dec, 2018

1 commit

  • In cas of probe failure, devres may free the memory allocated for
    rtc->nvram before devm_rtc_release_device() is called. This leads to
    rtc_nvram_unregister using it after being freed which may lead to a crash.

    This has been shown to happen after commit 461e557b9727 ("rtc: nvmem: use
    devm_nvmem_register()")

    Reported-by: kernel test robot
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

23 Nov, 2018

2 commits


22 May, 2018

1 commit


01 Mar, 2018

2 commits

  • Export rtc_nvmem_register() so it can be called from drivers instead of
    only the core.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • Switch the parent of the nvmem device to the parent of the rtc device so it
    can be registered before the RTC.

    This is a small change in the ABI as the nvmem moves out of the
    /sys/class/rtc/rtcX folder to be under the parent device folder (that is
    where the previous nvram files where registered).

    However, it is still available under its correct location,
    /sys/bus/nvmem/devices which is the one that should be used by userspace
    applications.

    The other benefit is that the nvmem device can stay registered even if the
    rtc registration fails. Or it is possible to not register the rtc if the
    nvmem registration failed.

    Finally, it makes a lot of sense for devices that actually have different
    i2c or spi addresses for the RTC and the EEPROM. That is basically how it
    would end up when using MFD or even completely separate devices.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

15 Feb, 2018

3 commits


07 Jul, 2017

1 commit

  • Many RTCs have an on board non volatile storage. It can be battery backed
    RAM or an EEPROM. Use the nvmem subsystem to export it to both userspace
    and in-kernel consumers.

    This stays compatible with the previous (non documented) ABI that was using
    /sys/class/rtc/rtcx/device/nvram to export that memory. But will warn about
    the deprecation.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni