Lines Matching refs:pclk

165 	struct clk_plt *pclk;  in plt_clk_register()  local
169 pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL); in plt_clk_register()
170 if (!pclk) in plt_clk_register()
179 pclk->hw.init = &init; in plt_clk_register()
180 pclk->reg = pmc_data->base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE; in plt_clk_register()
181 spin_lock_init(&pclk->lock); in plt_clk_register()
188 if (pmc_data->critical && plt_clk_is_enabled(&pclk->hw)) in plt_clk_register()
191 ret = devm_clk_hw_register(&pdev->dev, &pclk->hw); in plt_clk_register()
193 pclk = ERR_PTR(ret); in plt_clk_register()
197 pclk->lookup = clkdev_hw_create(&pclk->hw, init.name, NULL); in plt_clk_register()
198 if (!pclk->lookup) { in plt_clk_register()
199 pclk = ERR_PTR(-ENOMEM); in plt_clk_register()
205 return pclk; in plt_clk_register()
208 static void plt_clk_unregister(struct clk_plt *pclk) in plt_clk_unregister() argument
210 clkdev_drop(pclk->lookup); in plt_clk_unregister()
218 struct clk_plt_fixed *pclk; in plt_clk_register_fixed_rate() local
220 pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL); in plt_clk_register_fixed_rate()
221 if (!pclk) in plt_clk_register_fixed_rate()
224 pclk->clk = clk_hw_register_fixed_rate(&pdev->dev, name, parent_name, in plt_clk_register_fixed_rate()
226 if (IS_ERR(pclk->clk)) in plt_clk_register_fixed_rate()
227 return ERR_CAST(pclk->clk); in plt_clk_register_fixed_rate()
229 pclk->lookup = clkdev_hw_create(pclk->clk, name, NULL); in plt_clk_register_fixed_rate()
230 if (!pclk->lookup) { in plt_clk_register_fixed_rate()
231 clk_hw_unregister_fixed_rate(pclk->clk); in plt_clk_register_fixed_rate()
235 return pclk; in plt_clk_register_fixed_rate()
238 static void plt_clk_unregister_fixed_rate(struct clk_plt_fixed *pclk) in plt_clk_unregister_fixed_rate() argument
240 clkdev_drop(pclk->lookup); in plt_clk_unregister_fixed_rate()
241 clk_hw_unregister_fixed_rate(pclk->clk); in plt_clk_unregister_fixed_rate()