File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1386,6 +1386,7 @@ static int imx214_probe(struct i2c_client *client)
13861386{
13871387 struct device * dev = & client -> dev ;
13881388 struct imx214 * imx214 ;
1389+ u32 xclk_freq ;
13891390 int ret ;
13901391
13911392 imx214 = devm_kzalloc (dev , sizeof (* imx214 ), GFP_KERNEL );
@@ -1399,7 +1400,14 @@ static int imx214_probe(struct i2c_client *client)
13991400 return dev_err_probe (dev , PTR_ERR (imx214 -> xclk ),
14001401 "failed to get xclk\n" );
14011402
1402- ret = clk_set_rate (imx214 -> xclk , IMX214_DEFAULT_CLK_FREQ );
1403+ ret = device_property_read_u32 (dev , "clock-frequency" , & xclk_freq );
1404+ if (ret ) {
1405+ dev_warn (dev ,
1406+ "clock-frequency not set, please review your DT. Fallback to default\n" );
1407+ xclk_freq = IMX214_DEFAULT_CLK_FREQ ;
1408+ }
1409+
1410+ ret = clk_set_rate (imx214 -> xclk , xclk_freq );
14031411 if (ret )
14041412 return dev_err_probe (dev , ret ,
14051413 "failed to set xclk frequency\n" );
You can’t perform that action at this time.
0 commit comments