Lines Matching refs:dev

320 		dev_err(&pdev->dev,  in sun4i_spdif_hw_params()
595 static int sun4i_spdif_runtime_suspend(struct device *dev) in sun4i_spdif_runtime_suspend() argument
597 struct sun4i_spdif_dev *host = dev_get_drvdata(dev); in sun4i_spdif_runtime_suspend()
605 static int sun4i_spdif_runtime_resume(struct device *dev) in sun4i_spdif_runtime_resume() argument
607 struct sun4i_spdif_dev *host = dev_get_drvdata(dev); in sun4i_spdif_runtime_resume()
628 dev_dbg(&pdev->dev, "Entered %s\n", __func__); in sun4i_spdif_probe()
630 host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); in sun4i_spdif_probe()
639 host->cpu_dai_drv.name = dev_name(&pdev->dev); in sun4i_spdif_probe()
646 quirks = of_device_get_match_data(&pdev->dev); in sun4i_spdif_probe()
648 dev_err(&pdev->dev, "Failed to determine the quirks to use\n"); in sun4i_spdif_probe()
653 host->regmap = devm_regmap_init_mmio(&pdev->dev, base, in sun4i_spdif_probe()
657 host->apb_clk = devm_clk_get(&pdev->dev, "apb"); in sun4i_spdif_probe()
659 dev_err(&pdev->dev, "failed to get a apb clock.\n"); in sun4i_spdif_probe()
663 host->spdif_clk = devm_clk_get(&pdev->dev, "spdif"); in sun4i_spdif_probe()
665 dev_err(&pdev->dev, "failed to get a spdif clock.\n"); in sun4i_spdif_probe()
676 host->rst = devm_reset_control_get_optional_exclusive(&pdev->dev, in sun4i_spdif_probe()
680 dev_err(&pdev->dev, "Failed to get reset: %d\n", ret); in sun4i_spdif_probe()
687 ret = devm_snd_soc_register_component(&pdev->dev, in sun4i_spdif_probe()
692 pm_runtime_enable(&pdev->dev); in sun4i_spdif_probe()
693 if (!pm_runtime_enabled(&pdev->dev)) { in sun4i_spdif_probe()
694 ret = sun4i_spdif_runtime_resume(&pdev->dev); in sun4i_spdif_probe()
699 ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); in sun4i_spdif_probe()
704 if (!pm_runtime_status_suspended(&pdev->dev)) in sun4i_spdif_probe()
705 sun4i_spdif_runtime_suspend(&pdev->dev); in sun4i_spdif_probe()
707 pm_runtime_disable(&pdev->dev); in sun4i_spdif_probe()
713 pm_runtime_disable(&pdev->dev); in sun4i_spdif_remove()
714 if (!pm_runtime_status_suspended(&pdev->dev)) in sun4i_spdif_remove()
715 sun4i_spdif_runtime_suspend(&pdev->dev); in sun4i_spdif_remove()