• Home
  • Raw
  • Download

Lines Matching refs:pdev

486 static int s3c_pcm_dev_probe(struct platform_device *pdev)  in s3c_pcm_dev_probe()  argument
494 if ((pdev->id < 0) || pdev->id >= ARRAY_SIZE(s3c_pcm)) { in s3c_pcm_dev_probe()
495 dev_err(&pdev->dev, "id %d out of range\n", pdev->id); in s3c_pcm_dev_probe()
499 pcm_pdata = pdev->dev.platform_data; in s3c_pcm_dev_probe()
502 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in s3c_pcm_dev_probe()
504 dev_err(&pdev->dev, "Unable to get register resource\n"); in s3c_pcm_dev_probe()
508 if (pcm_pdata && pcm_pdata->cfg_gpio && pcm_pdata->cfg_gpio(pdev)) { in s3c_pcm_dev_probe()
509 dev_err(&pdev->dev, "Unable to configure gpio\n"); in s3c_pcm_dev_probe()
513 pcm = &s3c_pcm[pdev->id]; in s3c_pcm_dev_probe()
514 pcm->dev = &pdev->dev; in s3c_pcm_dev_probe()
521 pcm->cclk = devm_clk_get(&pdev->dev, "audio-bus"); in s3c_pcm_dev_probe()
523 dev_err(&pdev->dev, "failed to get audio-bus\n"); in s3c_pcm_dev_probe()
530 dev_set_drvdata(&pdev->dev, pcm); in s3c_pcm_dev_probe()
534 dev_err(&pdev->dev, "Unable to request register region\n"); in s3c_pcm_dev_probe()
541 dev_err(&pdev->dev, "cannot ioremap registers\n"); in s3c_pcm_dev_probe()
546 pcm->pclk = devm_clk_get(&pdev->dev, "pcm"); in s3c_pcm_dev_probe()
548 dev_err(&pdev->dev, "failed to get pcm_clock\n"); in s3c_pcm_dev_probe()
554 s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start in s3c_pcm_dev_probe()
556 s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start in s3c_pcm_dev_probe()
560 s3c_pcm_stereo_in[pdev->id].slave = pcm_pdata->dma_capture; in s3c_pcm_dev_probe()
561 s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback; in s3c_pcm_dev_probe()
564 pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; in s3c_pcm_dev_probe()
565 pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; in s3c_pcm_dev_probe()
567 pm_runtime_enable(&pdev->dev); in s3c_pcm_dev_probe()
569 ret = devm_snd_soc_register_component(&pdev->dev, &s3c_pcm_component, in s3c_pcm_dev_probe()
570 &s3c_pcm_dai[pdev->id], 1); in s3c_pcm_dev_probe()
572 dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret); in s3c_pcm_dev_probe()
576 ret = samsung_asoc_dma_platform_register(&pdev->dev); in s3c_pcm_dev_probe()
578 dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); in s3c_pcm_dev_probe()
596 static int s3c_pcm_dev_remove(struct platform_device *pdev) in s3c_pcm_dev_remove() argument
598 struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id]; in s3c_pcm_dev_remove()
601 pm_runtime_disable(&pdev->dev); in s3c_pcm_dev_remove()
605 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in s3c_pcm_dev_remove()