• Marek Szyprowski's avatar
    rtc: s3c: Rewrite clock handling · 5a5b614b
    Marek Szyprowski authored
    s3c_rtc_enable/disable_clk() functions were designed to be called multiple
    times without reference counting, because they were initially only used in
    alarm setting/clearing functions, which can be called both when alarm is
    already set or not. Later however, calls to those functions have been added to
    other places in the driver - like time and /proc reading callbacks, what
    results in broken alarm if any of such events happens after the alarm has
    been set. Fix this by simplifying s3c_rtc_enable/disable_clk() functions
    to rely on proper reference counting in clock core and move alarm enable
    counter to s3c_rtc_setaie() function.
    Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
    Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
    Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
    5a5b614b
rtc-s3c.c 20.3 KB