summaryrefslogtreecommitdiff
path: root/drivers/rtc/lib.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2022-09-27 12:11:21 +0200
committerChen-Yu Tsai <wenst@chromium.org>2022-09-29 12:05:13 +0800
commitb66add7a74e84a915dc8e1da89e192751e74bb4c (patch)
treed8c712464bb45fc9dbfb14fddb80072f7f0c8749 /drivers/rtc/lib.c
parent9f94f545f258b15bfa6357eb62e1e307b712851e (diff)
downloadlinux-b66add7a74e84a915dc8e1da89e192751e74bb4c.tar.gz
linux-b66add7a74e84a915dc8e1da89e192751e74bb4c.tar.bz2
linux-b66add7a74e84a915dc8e1da89e192751e74bb4c.zip
clk: mediatek: mux: add clk notifier functions
With device frequency scaling, the mux clock that (indirectly) feeds the device selects between a dedicated PLL, and some other stable clocks. When a clk rate change is requested, the (normally) upstream PLL is reconfigured. It's possible for the clock output of the PLL to become unstable during this process. To avoid causing the device to glitch, the mux should temporarily be switched over to another "stable" clock during the PLL rate change. This is done with clk notifiers. This patch adds common functions for notifiers to temporarily and transparently reparent mux clocks. This was loosely based on commit 8adfb08605a9 ("clk: sunxi-ng: mux: Add clk notifier functions"). Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> [Angelo: Changed mtk_mux_nb to hold a pointer to clk_ops instead of mtk_mux] Co-developed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Miles Chen <miles.chen@mediatek.com> Link: https://lore.kernel.org/r/20220927101128.44758-4-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Diffstat (limited to 'drivers/rtc/lib.c')
0 files changed, 0 insertions, 0 deletions