Lines Matching refs:pdev
201 static int spdif_in_probe(struct platform_device *pdev) in spdif_in_probe() argument
208 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in spdif_in_probe()
212 res_fifo = platform_get_resource(pdev, IORESOURCE_IO, 0); in spdif_in_probe()
216 if (!devm_request_mem_region(&pdev->dev, res->start, in spdif_in_probe()
217 resource_size(res), pdev->name)) { in spdif_in_probe()
218 dev_warn(&pdev->dev, "Failed to get memory resourse\n"); in spdif_in_probe()
222 host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); in spdif_in_probe()
224 dev_warn(&pdev->dev, "kzalloc fail\n"); in spdif_in_probe()
228 host->io_base = devm_ioremap(&pdev->dev, res->start, in spdif_in_probe()
231 dev_warn(&pdev->dev, "ioremap failed\n"); in spdif_in_probe()
235 host->irq = platform_get_irq(pdev, 0); in spdif_in_probe()
239 host->clk = devm_clk_get(&pdev->dev, NULL); in spdif_in_probe()
243 pdata = dev_get_platdata(&pdev->dev); in spdif_in_probe()
254 host->dev = &pdev->dev; in spdif_in_probe()
255 dev_set_drvdata(&pdev->dev, host); in spdif_in_probe()
257 ret = devm_request_irq(&pdev->dev, host->irq, spdif_in_irq, 0, in spdif_in_probe()
260 dev_warn(&pdev->dev, "request_irq failed\n"); in spdif_in_probe()
264 ret = devm_snd_soc_register_component(&pdev->dev, &spdif_in_component, in spdif_in_probe()
269 return devm_spear_pcm_platform_register(&pdev->dev, &host->config, in spdif_in_probe()