Lines Matching full:bc
284 struct imx95_blk_ctl *bc; in imx95_bc_probe() local
290 bc = devm_kzalloc(dev, sizeof(*bc), GFP_KERNEL); in imx95_bc_probe()
291 if (!bc) in imx95_bc_probe()
293 bc->dev = dev; in imx95_bc_probe()
294 dev_set_drvdata(&pdev->dev, bc); in imx95_bc_probe()
296 spin_lock_init(&bc->lock); in imx95_bc_probe()
302 bc->base = base; in imx95_bc_probe()
303 bc->clk_apb = devm_clk_get(dev, NULL); in imx95_bc_probe()
304 if (IS_ERR(bc->clk_apb)) in imx95_bc_probe()
305 return dev_err_probe(dev, PTR_ERR(bc->clk_apb), "failed to get APB clock\n"); in imx95_bc_probe()
307 ret = clk_prepare_enable(bc->clk_apb); in imx95_bc_probe()
336 data->flags2, &bc->lock); in imx95_bc_probe()
340 data->bit_width, data->flags2, &bc->lock); in imx95_bc_probe()
344 data->flags2, &bc->lock); in imx95_bc_probe()
363 if (pm_runtime_enabled(bc->dev)) in imx95_bc_probe()
364 clk_disable_unprepare(bc->clk_apb); in imx95_bc_probe()
384 struct imx95_blk_ctl *bc = dev_get_drvdata(dev); in imx95_bc_runtime_suspend() local
386 clk_disable_unprepare(bc->clk_apb); in imx95_bc_runtime_suspend()
392 struct imx95_blk_ctl *bc = dev_get_drvdata(dev); in imx95_bc_runtime_resume() local
394 return clk_prepare_enable(bc->clk_apb); in imx95_bc_runtime_resume()
401 struct imx95_blk_ctl *bc = dev_get_drvdata(dev); in imx95_bc_suspend() local
410 ret = pm_runtime_get_sync(bc->dev); in imx95_bc_suspend()
412 pm_runtime_put_noidle(bc->dev); in imx95_bc_suspend()
417 bc->clk_reg_restore = readl(bc->base + bc_data->clk_reg_offset); in imx95_bc_suspend()
424 struct imx95_blk_ctl *bc = dev_get_drvdata(dev); in imx95_bc_resume() local
431 writel(bc->clk_reg_restore, bc->base + bc_data->clk_reg_offset); in imx95_bc_resume()
434 pm_runtime_put(bc->dev); in imx95_bc_resume()