Lines Matching refs:pdev

186 static int fsl_aud2htx_probe(struct platform_device *pdev)  in fsl_aud2htx_probe()  argument
193 aud2htx = devm_kzalloc(&pdev->dev, sizeof(*aud2htx), GFP_KERNEL); in fsl_aud2htx_probe()
197 aud2htx->pdev = pdev; in fsl_aud2htx_probe()
199 regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in fsl_aud2htx_probe()
203 aud2htx->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in fsl_aud2htx_probe()
206 dev_err(&pdev->dev, "failed to init regmap"); in fsl_aud2htx_probe()
210 irq = platform_get_irq(pdev, 0); in fsl_aud2htx_probe()
214 ret = devm_request_irq(&pdev->dev, irq, fsl_aud2htx_isr, 0, in fsl_aud2htx_probe()
215 dev_name(&pdev->dev), aud2htx); in fsl_aud2htx_probe()
217 dev_err(&pdev->dev, "failed to claim irq %u: %d\n", irq, ret); in fsl_aud2htx_probe()
221 aud2htx->bus_clk = devm_clk_get(&pdev->dev, "bus"); in fsl_aud2htx_probe()
223 dev_err(&pdev->dev, "failed to get mem clock\n"); in fsl_aud2htx_probe()
231 platform_set_drvdata(pdev, aud2htx); in fsl_aud2htx_probe()
232 pm_runtime_enable(&pdev->dev); in fsl_aud2htx_probe()
240 ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); in fsl_aud2htx_probe()
242 dev_err(&pdev->dev, "failed to pcm register\n"); in fsl_aud2htx_probe()
243 pm_runtime_disable(&pdev->dev); in fsl_aud2htx_probe()
247 ret = devm_snd_soc_register_component(&pdev->dev, in fsl_aud2htx_probe()
251 dev_err(&pdev->dev, "failed to register ASoC DAI\n"); in fsl_aud2htx_probe()
252 pm_runtime_disable(&pdev->dev); in fsl_aud2htx_probe()
259 static void fsl_aud2htx_remove(struct platform_device *pdev) in fsl_aud2htx_remove() argument
261 pm_runtime_disable(&pdev->dev); in fsl_aud2htx_remove()