Lines Matching refs:pdev
104 struct platform_device *pdev; member
330 dev_err(&sai->pdev->dev, "Divider %d out of range\n", div); in stm32_sai_get_clk_div()
333 dev_dbg(&sai->pdev->dev, "SAI divider %d\n", div); in stm32_sai_get_clk_div()
336 dev_dbg(&sai->pdev->dev, in stm32_sai_get_clk_div()
350 dev_err(&sai->pdev->dev, "Divider %d out of range\n", div); in stm32_sai_set_clk_div()
358 dev_err(&sai->pdev->dev, "Failed to update CR1 register\n"); in stm32_sai_set_clk_div()
384 struct platform_device *pdev = sai->pdev; in stm32_sai_set_parent_clk() local
393 dev_err(&pdev->dev, " Error %d setting sai_ck parent clock. %s", in stm32_sai_set_parent_clk()
411 struct platform_device *pdev = sai->pdev; in stm32_sai_set_parent_rate() local
450 dev_dbg(&pdev->dev, "kernel clock rate: min [%u], max [%u], current [%u]", in stm32_sai_set_parent_rate()
469 dev_err(&pdev->dev, "Error %d setting sai_ck rate. %s", in stm32_sai_set_parent_rate()
484 dev_err(&pdev->dev, "Failed to find an accurate rate"); in stm32_sai_set_parent_rate()
543 dev_dbg(&sai->pdev->dev, "Enable master clock\n"); in stm32_sai_mclk_enable()
554 dev_dbg(&sai->pdev->dev, "Disable master clock\n"); in stm32_sai_mclk_disable()
571 struct device *dev = &sai->pdev->dev; in stm32_sai_add_mclk_provider()
601 ret = devm_clk_hw_register(&sai->pdev->dev, hw); in stm32_sai_add_mclk_provider()
615 struct platform_device *pdev = sai->pdev; in stm32_sai_isr() local
630 dev_err(&pdev->dev, "Device stopped. Spurious IRQ 0x%x\n", sr); in stm32_sai_isr()
635 dev_err(&pdev->dev, "IRQ %s\n", in stm32_sai_isr()
641 dev_dbg(&pdev->dev, "IRQ mute detected\n"); in stm32_sai_isr()
644 dev_err(&pdev->dev, "IRQ wrong clock configuration\n"); in stm32_sai_isr()
649 dev_err(&pdev->dev, "IRQ Codec not ready\n"); in stm32_sai_isr()
652 dev_err(&pdev->dev, "IRQ Anticipated frame synchro\n"); in stm32_sai_isr()
657 dev_err(&pdev->dev, "IRQ Late frame synchro\n"); in stm32_sai_isr()
1302 dev_dbg(&sai->pdev->dev, "%s: register iec controls", __func__); in stm32_sai_pcm_new()
1494 static int stm32_sai_sub_parse_of(struct platform_device *pdev, in stm32_sai_sub_parse_of() argument
1497 struct device_node *np = pdev->dev.of_node; in stm32_sai_sub_parse_of()
1506 base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in stm32_sai_sub_parse_of()
1522 sai->regmap = devm_regmap_init_mmio(&pdev->dev, base, in stm32_sai_sub_parse_of()
1525 return dev_err_probe(&pdev->dev, PTR_ERR(sai->regmap), in stm32_sai_sub_parse_of()
1534 dev_err(&pdev->dev, "Unsupported direction\n"); in stm32_sai_sub_parse_of()
1543 dev_err(&pdev->dev, "S/PDIF IEC60958 not supported\n"); in stm32_sai_sub_parse_of()
1555 dev_err(&pdev->dev, "Failed to get st,sync property\n"); in stm32_sai_sub_parse_of()
1562 dev_err(&pdev->dev, "%pOFn sync own reference\n", np); in stm32_sai_sub_parse_of()
1569 dev_err(&pdev->dev, "%pOFn parent node not found\n", in stm32_sai_sub_parse_of()
1576 if (sai->np_sync_provider != sai->pdata->pdev->dev.of_node) { in stm32_sai_sub_parse_of()
1578 dev_err(&pdev->dev, in stm32_sai_sub_parse_of()
1588 dev_err(&pdev->dev, "Wrong SAI index\n"); in stm32_sai_sub_parse_of()
1602 dev_err(&pdev->dev, "Unknown SAI sub-block\n"); in stm32_sai_sub_parse_of()
1608 dev_dbg(&pdev->dev, "%s synchronized with %s\n", in stm32_sai_sub_parse_of()
1609 pdev->name, args.np->full_name); in stm32_sai_sub_parse_of()
1613 sai->sai_ck = devm_clk_get(&pdev->dev, "sai_ck"); in stm32_sai_sub_parse_of()
1615 return dev_err_probe(&pdev->dev, PTR_ERR(sai->sai_ck), in stm32_sai_sub_parse_of()
1631 sai->sai_mclk = devm_clk_get_optional(&pdev->dev, "MCLK"); in stm32_sai_sub_parse_of()
1639 static int stm32_sai_sub_probe(struct platform_device *pdev) in stm32_sai_sub_probe() argument
1645 sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL); in stm32_sai_sub_probe()
1649 sai->id = (uintptr_t)device_get_match_data(&pdev->dev); in stm32_sai_sub_probe()
1651 sai->pdev = pdev; in stm32_sai_sub_probe()
1654 platform_set_drvdata(pdev, sai); in stm32_sai_sub_probe()
1656 sai->pdata = dev_get_drvdata(pdev->dev.parent); in stm32_sai_sub_probe()
1658 dev_err(&pdev->dev, "Parent device data not available\n"); in stm32_sai_sub_probe()
1669 ret = stm32_sai_sub_parse_of(pdev, sai); in stm32_sai_sub_probe()
1677 sai->cpu_dai_drv.name = dev_name(&pdev->dev); in stm32_sai_sub_probe()
1679 ret = devm_request_irq(&pdev->dev, sai->pdata->irq, stm32_sai_isr, in stm32_sai_sub_probe()
1680 IRQF_SHARED, dev_name(&pdev->dev), sai); in stm32_sai_sub_probe()
1682 dev_err(&pdev->dev, "IRQ request returned %d\n", ret); in stm32_sai_sub_probe()
1689 ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0); in stm32_sai_sub_probe()
1691 return dev_err_probe(&pdev->dev, ret, "Could not register pcm dma\n"); in stm32_sai_sub_probe()
1693 ret = snd_soc_register_component(&pdev->dev, &stm32_component, in stm32_sai_sub_probe()
1696 snd_dmaengine_pcm_unregister(&pdev->dev); in stm32_sai_sub_probe()
1700 pm_runtime_enable(&pdev->dev); in stm32_sai_sub_probe()
1705 static void stm32_sai_sub_remove(struct platform_device *pdev) in stm32_sai_sub_remove() argument
1707 struct stm32_sai_sub_data *sai = dev_get_drvdata(&pdev->dev); in stm32_sai_sub_remove()
1710 snd_dmaengine_pcm_unregister(&pdev->dev); in stm32_sai_sub_remove()
1711 snd_soc_unregister_component(&pdev->dev); in stm32_sai_sub_remove()
1712 pm_runtime_disable(&pdev->dev); in stm32_sai_sub_remove()