Lines Matching refs:spdif
51 struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); in axi_spdif_trigger() local
69 regmap_update_bits(spdif->regmap, AXI_SPDIF_REG_CTRL, in axi_spdif_trigger()
78 struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); in axi_spdif_hw_params() local
97 clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref), in axi_spdif_hw_params()
101 regmap_write(spdif->regmap, AXI_SPDIF_REG_STAT, stat); in axi_spdif_hw_params()
102 regmap_update_bits(spdif->regmap, AXI_SPDIF_REG_CTRL, in axi_spdif_hw_params()
110 struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); in axi_spdif_dai_probe() local
112 snd_soc_dai_init_dma_data(dai, &spdif->dma_data, NULL); in axi_spdif_dai_probe()
120 struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); in axi_spdif_startup() local
125 &spdif->rate_constraints); in axi_spdif_startup()
129 ret = clk_prepare_enable(spdif->clk_ref); in axi_spdif_startup()
133 regmap_update_bits(spdif->regmap, AXI_SPDIF_REG_CTRL, in axi_spdif_startup()
142 struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); in axi_spdif_shutdown() local
144 regmap_update_bits(spdif->regmap, AXI_SPDIF_REG_CTRL, in axi_spdif_shutdown()
147 clk_disable_unprepare(spdif->clk_ref); in axi_spdif_shutdown()
182 struct axi_spdif *spdif; in axi_spdif_probe() local
187 spdif = devm_kzalloc(&pdev->dev, sizeof(*spdif), GFP_KERNEL); in axi_spdif_probe()
188 if (!spdif) in axi_spdif_probe()
191 platform_set_drvdata(pdev, spdif); in axi_spdif_probe()
197 spdif->regmap = devm_regmap_init_mmio(&pdev->dev, base, in axi_spdif_probe()
199 if (IS_ERR(spdif->regmap)) in axi_spdif_probe()
200 return PTR_ERR(spdif->regmap); in axi_spdif_probe()
202 spdif->clk = devm_clk_get(&pdev->dev, "axi"); in axi_spdif_probe()
203 if (IS_ERR(spdif->clk)) in axi_spdif_probe()
204 return PTR_ERR(spdif->clk); in axi_spdif_probe()
206 spdif->clk_ref = devm_clk_get(&pdev->dev, "ref"); in axi_spdif_probe()
207 if (IS_ERR(spdif->clk_ref)) in axi_spdif_probe()
208 return PTR_ERR(spdif->clk_ref); in axi_spdif_probe()
210 ret = clk_prepare_enable(spdif->clk); in axi_spdif_probe()
214 spdif->dma_data.addr = res->start + AXI_SPDIF_REG_TX_FIFO; in axi_spdif_probe()
215 spdif->dma_data.addr_width = 4; in axi_spdif_probe()
216 spdif->dma_data.maxburst = 1; in axi_spdif_probe()
218 spdif->ratnum.num = clk_get_rate(spdif->clk_ref) / 128; in axi_spdif_probe()
219 spdif->ratnum.den_step = 1; in axi_spdif_probe()
220 spdif->ratnum.den_min = 1; in axi_spdif_probe()
221 spdif->ratnum.den_max = 64; in axi_spdif_probe()
223 spdif->rate_constraints.rats = &spdif->ratnum; in axi_spdif_probe()
224 spdif->rate_constraints.nrats = 1; in axi_spdif_probe()
238 clk_disable_unprepare(spdif->clk); in axi_spdif_probe()
244 struct axi_spdif *spdif = platform_get_drvdata(pdev); in axi_spdif_dev_remove() local
246 clk_disable_unprepare(spdif->clk); in axi_spdif_dev_remove()