Skip to content

Commit 2c17810

Browse files
Zefa Chenrkhuangtao
authored andcommitted
media: rockchip: vicap: fixes warning of clk disable when dev suspend
iclk_csihost1 already disabled WARNING: CPU: 1 PID: 1977 at drivers/clk/clk.c:1040 clk_core_disable+0x88/0x220 Modules linked in: bcmdhd r8168 CPU: 1 PID: 1977 Comm: binder:315_4 Not tainted 6.1.25 rockchip-linux#139 Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT) pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : clk_core_disable+0x88/0x220 lr : clk_core_disable+0x88/0x220 sp : ffffffc01221b9a0 x29: ffffffc01221b9a0 x28: ffffff8102014d28 x27: 0000000000000000 x26: ffffff8102014c10 x25: ffffffc00a22b000 x24: ffffffc00a171000 x23: ffffff814e3e5c80 x22: ffffffc00a222000 x21: ffffffc00a222000 x20: ffffff810024fe00 x19: ffffff810024fe00 x18: ffffffc00add90b0 x17: 0000000000000013 x16: ffffffffffffffff x15: 0000000000000004 x14: ffffffc009dbdf18 x13: 0000000000003fff x12: 0000000000000003 x11: 00000000ffffbfff x10: c0000000ffffbfff x9 : e683b01efecc8800 x8 : e683b01efecc8800 x7 : 205b5d3835343931 x6 : 342e39322020205b x5 : ffffffc00a1f37c7 x4 : ffffffc01221b6d7 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffffffc01221b740 x0 : 000000000000001e Call trace: clk_core_disable+0x88/0x220 clk_core_disable_lock+0x9c/0x130 clk_disable+0x20/0x2c rkcif_sleep_suspend+0x3c/0x6c Fixes: af37f21 ("media: rockchip: vicap fixes suspend/resume") Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I49f7adf948c9049ec6ad8fea8f8089e991e39b91
1 parent a7c7116 commit 2c17810

File tree

1 file changed

+6
-0
lines changed
  • drivers/media/platform/rockchip/cif

1 file changed

+6
-0
lines changed

drivers/media/platform/rockchip/cif/hw.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,9 @@ static int __maybe_unused rkcif_sleep_suspend(struct device *dev)
15541554
{
15551555
struct rkcif_hw *cif_hw = dev_get_drvdata(dev);
15561556

1557+
if (atomic_read(&cif_hw->power_cnt) == 0)
1558+
return 0;
1559+
15571560
rkcif_disable_sys_clk(cif_hw);
15581561

15591562
return pinctrl_pm_select_sleep_state(dev);
@@ -1564,6 +1567,9 @@ static int __maybe_unused rkcif_sleep_resume(struct device *dev)
15641567
struct rkcif_hw *cif_hw = dev_get_drvdata(dev);
15651568
int ret;
15661569

1570+
if (atomic_read(&cif_hw->power_cnt) == 0)
1571+
return 0;
1572+
15671573
ret = pinctrl_pm_select_default_state(dev);
15681574
if (ret < 0)
15691575
return ret;

0 commit comments

Comments
 (0)