• Home
  • Raw
  • Download

Lines Matching refs:pdev

229 	struct platform_device *pdev;  member
253 struct platform_device *pdev = spdifrx->pdev; in stm32_spdifrx_dma_complete() local
274 dev_err(&pdev->dev, "Start of S/PDIF block not found\n"); in stm32_spdifrx_dma_complete()
282 dev_err(&pdev->dev, "Failed to get channel status\n"); in stm32_spdifrx_dma_complete()
343 dev_dbg(&spdifrx->pdev->dev, "start synchronization\n"); in stm32_spdifrx_start_sync()
363 dev_err(&spdifrx->pdev->dev, in stm32_spdifrx_start_sync()
494 dev_err(&spdifrx->pdev->dev, "Enable kclk failed: %d\n", ret); in stm32_spdifrx_get_ctrl_data()
510 dev_dbg(&spdifrx->pdev->dev, "Failed to get control data\n"); in stm32_spdifrx_get_ctrl_data()
670 struct platform_device *pdev = spdifrx->pdev; in stm32_spdifrx_isr() local
685 dev_err(&pdev->dev, "Unexpected IRQ. rflags=%#x, imr=%#x\n", in stm32_spdifrx_isr()
695 dev_dbg(&pdev->dev, "Parity error\n"); in stm32_spdifrx_isr()
700 dev_dbg(&pdev->dev, "Overrun error\n"); in stm32_spdifrx_isr()
705 dev_dbg(&pdev->dev, "Synchronization block detected\n"); in stm32_spdifrx_isr()
708 dev_dbg(&pdev->dev, "Synchronization done\n"); in stm32_spdifrx_isr()
717 dev_dbg(&pdev->dev, "Frame error\n"); in stm32_spdifrx_isr()
722 dev_dbg(&pdev->dev, "Synchronization error\n"); in stm32_spdifrx_isr()
727 dev_dbg(&pdev->dev, "Timeout error\n"); in stm32_spdifrx_isr()
779 dev_err(&spdifrx->pdev->dev, "Enable kclk failed: %d\n", ret); in stm32_spdifrx_startup()
800 dev_err(&spdifrx->pdev->dev, "Unexpected data format\n"); in stm32_spdifrx_hw_params()
908 static int stm32_spdifrx_parse_of(struct platform_device *pdev, in stm32_spdifrx_parse_of() argument
911 struct device_node *np = pdev->dev.of_node; in stm32_spdifrx_parse_of()
918 of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev); in stm32_spdifrx_parse_of()
925 spdifrx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in stm32_spdifrx_parse_of()
931 spdifrx->kclk = devm_clk_get(&pdev->dev, "kclk"); in stm32_spdifrx_parse_of()
934 dev_err(&pdev->dev, "Could not get kclk: %ld\n", in stm32_spdifrx_parse_of()
939 spdifrx->irq = platform_get_irq(pdev, 0); in stm32_spdifrx_parse_of()
946 static int stm32_spdifrx_remove(struct platform_device *pdev) in stm32_spdifrx_remove() argument
948 struct stm32_spdifrx_data *spdifrx = platform_get_drvdata(pdev); in stm32_spdifrx_remove()
956 snd_dmaengine_pcm_unregister(&pdev->dev); in stm32_spdifrx_remove()
957 snd_soc_unregister_component(&pdev->dev); in stm32_spdifrx_remove()
962 static int stm32_spdifrx_probe(struct platform_device *pdev) in stm32_spdifrx_probe() argument
970 spdifrx = devm_kzalloc(&pdev->dev, sizeof(*spdifrx), GFP_KERNEL); in stm32_spdifrx_probe()
974 spdifrx->pdev = pdev; in stm32_spdifrx_probe()
979 platform_set_drvdata(pdev, spdifrx); in stm32_spdifrx_probe()
981 ret = stm32_spdifrx_parse_of(pdev, spdifrx); in stm32_spdifrx_probe()
985 spdifrx->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "kclk", in stm32_spdifrx_probe()
990 dev_err(&pdev->dev, "Regmap init error %ld\n", in stm32_spdifrx_probe()
995 ret = devm_request_irq(&pdev->dev, spdifrx->irq, stm32_spdifrx_isr, 0, in stm32_spdifrx_probe()
996 dev_name(&pdev->dev), spdifrx); in stm32_spdifrx_probe()
998 dev_err(&pdev->dev, "IRQ request returned %d\n", ret); in stm32_spdifrx_probe()
1002 rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL); in stm32_spdifrx_probe()
1005 dev_err(&pdev->dev, "Reset controller error %ld\n", in stm32_spdifrx_probe()
1014 ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, 0); in stm32_spdifrx_probe()
1017 dev_err(&pdev->dev, "PCM DMA register error %d\n", ret); in stm32_spdifrx_probe()
1021 ret = snd_soc_register_component(&pdev->dev, in stm32_spdifrx_probe()
1026 snd_dmaengine_pcm_unregister(&pdev->dev); in stm32_spdifrx_probe()
1030 ret = stm32_spdifrx_dma_ctrl_register(&pdev->dev, spdifrx); in stm32_spdifrx_probe()
1043 dev_dbg(&pdev->dev, "SPDIFRX version: %lu.%lu registered\n", in stm32_spdifrx_probe()
1051 stm32_spdifrx_remove(pdev); in stm32_spdifrx_probe()