mbox series

[RESEND,v2,0/2] clk: Fix CLK_OPS_PARENT_ENABLE and runtime PM

Message ID 20220822081424.1310926-1-wenst@chromium.org (mailing list archive)
Headers show
Series clk: Fix CLK_OPS_PARENT_ENABLE and runtime PM | expand

Message

Chen-Yu Tsai Aug. 22, 2022, 8:14 a.m. UTC
Hi Mike, Stephen,

Resending this series from last month. This is now based on
next-20220822, but should apply cleanly to v6.0-rc1.

Here are a couple fixes for the clk core. They are unrelated but overlap
in diff context, so I'm sending them together.

Patch 1 makes the clk core honor CLK_OPS_PARENT_ENABLE for clk gate ops.
Without this, dumping clk_summary on the MT8192 would cause the system
to hang.

Patch 2 reorders the runtime PM call in clk_core_unprepare() to match
the order described in its original commit, and the opposite of that
in clk_core_prepare().

Changes since v1
- Use clk_core_{enable,disable}_lock() instead of non-locking variant.
  Reported by NĂ­colas
- Added coverage for clk_core_is_prepared()
- Correct sequencing in clk_core_is_enabled() so that runtime PM is
  handled before parent clock is enabled, matching other functions.


Regards
ChenYu

Chen-Yu Tsai (2):
  clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops
  clk: core: Fix runtime PM sequence in clk_core_unprepare()

 drivers/clk/clk.c | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)