Commit e81361f6 authored by Dong Aisheng's avatar Dong Aisheng Committed by Abel Vesa
Browse files

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



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>
parent ff427961
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment