Lines Matching refs:spdif

30 	struct tegra20_spdif *spdif = dev_get_drvdata(dev);  in tegra20_spdif_runtime_suspend()  local
32 regcache_cache_only(spdif->regmap, true); in tegra20_spdif_runtime_suspend()
34 clk_disable_unprepare(spdif->clk_spdif_out); in tegra20_spdif_runtime_suspend()
41 struct tegra20_spdif *spdif = dev_get_drvdata(dev); in tegra20_spdif_runtime_resume() local
44 ret = reset_control_assert(spdif->reset); in tegra20_spdif_runtime_resume()
48 ret = clk_prepare_enable(spdif->clk_spdif_out); in tegra20_spdif_runtime_resume()
56 ret = reset_control_deassert(spdif->reset); in tegra20_spdif_runtime_resume()
60 regcache_cache_only(spdif->regmap, false); in tegra20_spdif_runtime_resume()
61 regcache_mark_dirty(spdif->regmap); in tegra20_spdif_runtime_resume()
63 ret = regcache_sync(spdif->regmap); in tegra20_spdif_runtime_resume()
70 clk_disable_unprepare(spdif->clk_spdif_out); in tegra20_spdif_runtime_resume()
79 struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); in tegra20_spdif_hw_params() local
95 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, mask, val); in tegra20_spdif_hw_params()
101 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_DATA_FIFO_CSR, in tegra20_spdif_hw_params()
131 ret = clk_set_rate(spdif->clk_spdif_out, spdifclock); in tegra20_spdif_hw_params()
137 rate = clk_get_rate(spdif->clk_spdif_out); in tegra20_spdif_hw_params()
146 static void tegra20_spdif_start_playback(struct tegra20_spdif *spdif) in tegra20_spdif_start_playback() argument
148 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, in tegra20_spdif_start_playback()
153 static void tegra20_spdif_stop_playback(struct tegra20_spdif *spdif) in tegra20_spdif_stop_playback() argument
155 regmap_update_bits(spdif->regmap, TEGRA20_SPDIF_CTRL, in tegra20_spdif_stop_playback()
162 struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); in tegra20_spdif_trigger() local
168 tegra20_spdif_start_playback(spdif); in tegra20_spdif_trigger()
173 tegra20_spdif_stop_playback(spdif); in tegra20_spdif_trigger()
187 struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); in tegra20_spdif_filter_rates() local
188 struct clk *parent = clk_get_parent(spdif->clk_spdif_out); in tegra20_spdif_filter_rates()
237 struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); in tegra20_spdif_probe() local
240 dai->playback_dma_data = &spdif->playback_dma_data; in tegra20_spdif_probe()
347 struct tegra20_spdif *spdif; in tegra20_spdif_platform_probe() local
352 spdif = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_spdif), in tegra20_spdif_platform_probe()
354 if (!spdif) in tegra20_spdif_platform_probe()
357 dev_set_drvdata(&pdev->dev, spdif); in tegra20_spdif_platform_probe()
359 spdif->reset = devm_reset_control_get_exclusive(&pdev->dev, NULL); in tegra20_spdif_platform_probe()
360 if (IS_ERR(spdif->reset)) { in tegra20_spdif_platform_probe()
362 return PTR_ERR(spdif->reset); in tegra20_spdif_platform_probe()
365 spdif->clk_spdif_out = devm_clk_get(&pdev->dev, "out"); in tegra20_spdif_platform_probe()
366 if (IS_ERR(spdif->clk_spdif_out)) { in tegra20_spdif_platform_probe()
368 return PTR_ERR(spdif->clk_spdif_out); in tegra20_spdif_platform_probe()
375 spdif->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_spdif_platform_probe()
377 if (IS_ERR(spdif->regmap)) { in tegra20_spdif_platform_probe()
379 return PTR_ERR(spdif->regmap); in tegra20_spdif_platform_probe()
382 spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; in tegra20_spdif_platform_probe()
383 spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in tegra20_spdif_platform_probe()
384 spdif->playback_dma_data.maxburst = 4; in tegra20_spdif_platform_probe()