MLK-23940-1 rtc: snvs: Make SNVS clock always prepared
In IRQ handler, ONLY clock enable/disable is called due to clock prepare can NOT be called in interrupt context, but clock enable/disable will return failure if prepare count is 0, to fix this issue, just make SNVS clock always prepared there, the SNVS clock has no prepare function implemented, so it won't impact anything. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Jacky Bai <ping.bai@nxp.com>
This commit is contained in:
parent
f9a5c2a86f
commit
2fdcbb1c66
|
@ -364,7 +364,7 @@ static int __maybe_unused snvs_rtc_suspend_noirq(struct device *dev)
|
|||
struct snvs_rtc_data *data = dev_get_drvdata(dev);
|
||||
|
||||
if (data->clk)
|
||||
clk_disable_unprepare(data->clk);
|
||||
clk_disable(data->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ static int __maybe_unused snvs_rtc_resume_noirq(struct device *dev)
|
|||
struct snvs_rtc_data *data = dev_get_drvdata(dev);
|
||||
|
||||
if (data->clk)
|
||||
return clk_prepare_enable(data->clk);
|
||||
return clk_enable(data->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue