@@ -691,24 +691,21 @@ static const struct clk_ops hdmi_8996_pll_ops = {
691
691
.is_enabled = hdmi_8996_pll_is_enabled ,
692
692
};
693
693
694
- static const char * const hdmi_pll_parents [] = {
695
- "xo" ,
696
- };
697
-
698
694
static const struct clk_init_data pll_init = {
699
695
.name = "hdmipll" ,
700
696
.ops = & hdmi_8996_pll_ops ,
701
- .parent_names = hdmi_pll_parents ,
702
- .num_parents = ARRAY_SIZE (hdmi_pll_parents ),
697
+ .parent_data = (const struct clk_parent_data []){
698
+ { .fw_name = "xo" , .name = "xo_board" },
699
+ },
700
+ .num_parents = 1 ,
703
701
.flags = CLK_IGNORE_UNUSED ,
704
702
};
705
703
706
704
int msm_hdmi_pll_8996_init (struct platform_device * pdev )
707
705
{
708
706
struct device * dev = & pdev -> dev ;
709
707
struct hdmi_pll_8996 * pll ;
710
- struct clk * clk ;
711
- int i ;
708
+ int i , ret ;
712
709
713
710
pll = devm_kzalloc (dev , sizeof (* pll ), GFP_KERNEL );
714
711
if (!pll )
@@ -735,10 +732,16 @@ int msm_hdmi_pll_8996_init(struct platform_device *pdev)
735
732
}
736
733
pll -> clk_hw .init = & pll_init ;
737
734
738
- clk = devm_clk_register (dev , & pll -> clk_hw );
739
- if (IS_ERR ( clk ) ) {
735
+ ret = devm_clk_hw_register (dev , & pll -> clk_hw );
736
+ if (ret ) {
740
737
DRM_DEV_ERROR (dev , "failed to register pll clock\n" );
741
- return - EINVAL ;
738
+ return ret ;
739
+ }
740
+
741
+ ret = devm_of_clk_add_hw_provider (dev , of_clk_hw_simple_get , & pll -> clk_hw );
742
+ if (ret ) {
743
+ DRM_DEV_ERROR (dev , "%s: failed to register clk provider: %d\n" , __func__ , ret );
744
+ return ret ;
742
745
}
743
746
744
747
return 0 ;
0 commit comments