From f997ee6df456b62ccbf576b976e0fab808f71792 Mon Sep 17 00:00:00 2001 From: ddl Date: Thu, 22 Aug 2013 16:52:12 +0800 Subject: [PATCH] camera: rk_cam_cif: v0.3.0x11 --- drivers/media/video/rk30_camera_oneframe.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/rk30_camera_oneframe.c b/drivers/media/video/rk30_camera_oneframe.c index 442cc645d925..a3f3c3d237e1 100755 --- a/drivers/media/video/rk30_camera_oneframe.c +++ b/drivers/media/video/rk30_camera_oneframe.c @@ -326,6 +326,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR); *v0.3.0x11: * 1. fix vb struct may be used again which have been free after stream off, some code modify in soc_camera.c, * version is v0.1.1; +* 1. fix cif clk out can't be turn off; * */ @@ -1596,14 +1597,20 @@ static int rk_camera_mclk_ctrl(int cif_idx, int on, int clk_rate) clk->on = false; if(cif){ cif_clk_out_div = clk_get(NULL, "cif1_out_div"); - err = clk_set_parent(clk->cif_clk_out,cif_clk_out_div); }else{ cif_clk_out_div = clk_get(NULL, "cif0_out_div"); - if(IS_ERR_OR_NULL(cif_clk_out_div)){ + if(IS_ERR_OR_NULL(cif_clk_out_div)) { cif_clk_out_div = clk_get(NULL, "cif_out_div"); } + } + + if(IS_ERR_OR_NULL(cif_clk_out_div)) { err = clk_set_parent(clk->cif_clk_out, cif_clk_out_div); + clk_put(cif_clk_out_div); + } else { + err = -1; } + if(err) RKCAMERA_TR("WARNING %s_%s_%d: camera sensor mclk maybe not close, please check!!!\n", __FILE__, __FUNCTION__, __LINE__); } -- 2.34.1