Home > OS >  Devm_clk_get for clock error
Devm_clk_get for clock error

Time:03-16

 hw - & gt; CLK=devm_clk_get (& amp; Pdev - & gt; Dev, "spi"); 
If (IS_ERR (hw - & gt; CLK)) {
Dev_err (& amp; Pdev - & gt; Dev, "No clock for device \ n");
Err=PTR_ERR (hw - & gt; CLK);
Goto err_no_pdata;
}


Here is to print out: No clock for device
My device is:
 static struct s3c2410_spi_info spi1_info={/* by kite 2017.9.13 */
. Num_cs=0 XFF,/*, the choice of */
Bus_num=1,
Set_cs=s3c24xx_spi_cs,
}

The static struct device_node spinp={
.name="spi",
};

Struct platform_device s3c_device_spi1={
.name="s3c2410 - spi",
Id=1,
. Num_resources=ARRAY_SIZE (s3c_spi1_resource),
.resource=s3c_spi1_resource,
. Dev={
. Dma_mask=& amp; Samsung_device_dma_mask,
. Coherent_dma_mask=DMA_BIT_MASK (32),
Platform_data=https://bbs.csdn.net/topics/&spi1_info,/* by kite 2017.9.13 */
. Of_node=& amp; Spinp,//struct device_node * of_node;
}
};


This should be get the clock structure function, I don't know how he matches,
I try to change to: hw - & gt; CLK=devm_clk_get (NULL, "spi");
Because I see the first parameter to null is, matching the name of the results will go wrong,,,,
Solving the,,,,, I am 4.8.17 Kernel

CodePudding user response:

Already solved...

CodePudding user response:

I also encountered this problem, the drive from kernel5.2 transplantation to 2.6, also is the problem here
  • Related