]> git.itanic.dy.fi Git - linux-stable/commit
clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops
authorChen-Yu Tsai <wenst@chromium.org>
Mon, 22 Aug 2022 08:14:23 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:17:03 +0000 (12:17 +0200)
commitb8de795976113249223bc4d2ecba6c35f223108e
tree47c0f4f027d5a79110cd2cd6295021a9d8529af8
parent9277808b2fcf0f26016256b09bdbc8b9197ce583
clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops

[ Upstream commit 35b0fac808b95eea1212f8860baf6ad25b88b087 ]

In the previous commits that added CLK_OPS_PARENT_ENABLE, support for
this flag was only added to rate change operations (rate setting and
reparent) and disabling unused subtree. It was not added to the
clock gate related operations. Any hardware driver that needs it for
these operations will either see bogus results, or worse, hang.

This has been seen on MT8192 and MT8195, where the imp_ii2_* clk
drivers set this, but dumping debugfs clk_summary would cause it
to hang.

Fixes: fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)")
Fixes: a4b3518d146f ("clk: core: support clocks which requires parents enable (part 1)")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220822081424.1310926-2-wenst@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk.c