Commit 3e4ff2af authored by Dong Aisheng's avatar Dong Aisheng Committed by Greg Kroah-Hartman
Browse files

clk: imx: clk-scu: fix clk enable state save and restore



[ Upstream commit e81361f6 ]

The scu clk_ops only inplements prepare() and unprepare() callback.
Saving the clock state during suspend by checking clk_hw_is_enabled()
is not safe as it's possible that some device drivers may only
disable the clocks without unprepare. Then the state retention will not
work for such clocks.

Fixing it by checking clk_hw_is_prepared() which is more reasonable
and safe.

Fixes: d0409631 ("clk: imx: scu: add suspend/resume support")
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Tested-by: default avatarCarlos Song <carlos.song@nxp.com>
Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Link: https://lore.kernel.org/r/20241027-imx-clk-v1-v3-4-89152574d1d7@nxp.com


Signed-off-by: default avatarAbel Vesa <abel.vesa@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 55eb217f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment