• Home
  • Raw
  • Download

Lines Matching refs:pdev

311 static int tegra20_ac97_platform_probe(struct platform_device *pdev)  in tegra20_ac97_platform_probe()  argument
318 ac97 = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_ac97), in tegra20_ac97_platform_probe()
321 dev_err(&pdev->dev, "Can't allocate tegra20_ac97\n"); in tegra20_ac97_platform_probe()
325 dev_set_drvdata(&pdev->dev, ac97); in tegra20_ac97_platform_probe()
327 ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL); in tegra20_ac97_platform_probe()
329 dev_err(&pdev->dev, "Can't retrieve ac97 clock\n"); in tegra20_ac97_platform_probe()
334 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); in tegra20_ac97_platform_probe()
335 regs = devm_ioremap_resource(&pdev->dev, mem); in tegra20_ac97_platform_probe()
341 ac97->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_ac97_platform_probe()
344 dev_err(&pdev->dev, "regmap init failed\n"); in tegra20_ac97_platform_probe()
349 ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
352 ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio, in tegra20_ac97_platform_probe()
355 dev_err(&pdev->dev, "could not get codec-reset GPIO\n"); in tegra20_ac97_platform_probe()
359 dev_err(&pdev->dev, "no codec-reset GPIO supplied\n"); in tegra20_ac97_platform_probe()
363 ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node, in tegra20_ac97_platform_probe()
366 dev_err(&pdev->dev, "no codec-sync GPIO supplied\n"); in tegra20_ac97_platform_probe()
380 dev_err(&pdev->dev, "clk_enable failed: %d\n", ret); in tegra20_ac97_platform_probe()
386 dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret); in tegra20_ac97_platform_probe()
390 ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, in tegra20_ac97_platform_probe()
393 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); in tegra20_ac97_platform_probe()
398 ret = tegra_pcm_platform_register(&pdev->dev); in tegra20_ac97_platform_probe()
400 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); in tegra20_ac97_platform_probe()
410 snd_soc_unregister_component(&pdev->dev); in tegra20_ac97_platform_probe()
419 static int tegra20_ac97_platform_remove(struct platform_device *pdev) in tegra20_ac97_platform_remove() argument
421 struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); in tegra20_ac97_platform_remove()
423 tegra_pcm_platform_unregister(&pdev->dev); in tegra20_ac97_platform_remove()
424 snd_soc_unregister_component(&pdev->dev); in tegra20_ac97_platform_remove()