]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: rv3028: fix clock output support
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 9 Oct 2020 15:30:58 +0000 (17:30 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 15 Oct 2020 10:09:34 +0000 (12:09 +0200)
commit7c00df8eca53416478d342a8e29e5f094c0bc2fd
treee17d027855fcc92e2e28dfa15700b77410086830
parenta009389255541e74074e4dbd77d5de0ed7435f0e
rtc: rv3028: fix clock output support

rv3028_clkout_set_rate unconditionally sets RV3028_CLKOUT_CLKOE but
clk_set_rate may be called with the clock disabled. Ensure the clock is
kept disabled if it was not yet enabled.

Also, the actual rate was overwritten when enabling the clock, properly
write to the register only once.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201009153101.721149-1-alexandre.belloni@bootlin.com
drivers/rtc/rtc-rv3028.c