Skip to content

Commit 92888f3

Browse files
MrVanabelvesa
authored andcommitted
clk: imx: lpcg-scu: Skip HDMI LPCG clock save/restore
On i.MX8QM, HDMI LPCG clocks operation needs SCU clock "hdmi_ipg_clk" to be ON. While during noirq suspend phase, "hdmi_ipg_clk" is disabled by HDMI IRQ STEER driver, so SError will be triggered when accessing the HDMI LPCG registers. Skip all HDMI LPCG clocks save/restore to avoid SError during system suspend/resume, it will NOT introduce additional power consumption as their parent clock is disabled when suspend. Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent e81361f commit 92888f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/clk/imx/clk-lpcg-scu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ static int __maybe_unused imx_clk_lpcg_scu_suspend(struct device *dev)
161161
{
162162
struct clk_lpcg_scu *clk = dev_get_drvdata(dev);
163163

164+
if (!strncmp("hdmi_lpcg", clk_hw_get_name(&clk->hw), strlen("hdmi_lpcg")))
165+
return 0;
166+
164167
clk->state = readl_relaxed(clk->reg);
165168
dev_dbg(dev, "save lpcg state 0x%x\n", clk->state);
166169

@@ -171,6 +174,9 @@ static int __maybe_unused imx_clk_lpcg_scu_resume(struct device *dev)
171174
{
172175
struct clk_lpcg_scu *clk = dev_get_drvdata(dev);
173176

177+
if (!strncmp("hdmi_lpcg", clk_hw_get_name(&clk->hw), strlen("hdmi_lpcg")))
178+
return 0;
179+
174180
writel(clk->state, clk->reg);
175181
lpcg_e10858_writel(0, clk->reg, clk->state);
176182
dev_dbg(dev, "restore lpcg state 0x%x\n", clk->state);

0 commit comments

Comments
 (0)