Lines Matching refs:prl

46 	struct img_prl_out *prl = dev_get_drvdata(dev);  in img_prl_out_suspend()  local
48 clk_disable_unprepare(prl->clk_ref); in img_prl_out_suspend()
55 struct img_prl_out *prl = dev_get_drvdata(dev); in img_prl_out_resume() local
58 ret = clk_prepare_enable(prl->clk_ref); in img_prl_out_resume()
67 static inline void img_prl_out_writel(struct img_prl_out *prl, in img_prl_out_writel() argument
70 writel(val, prl->base + reg); in img_prl_out_writel()
73 static inline u32 img_prl_out_readl(struct img_prl_out *prl, u32 reg) in img_prl_out_readl() argument
75 return readl(prl->base + reg); in img_prl_out_readl()
78 static void img_prl_out_reset(struct img_prl_out *prl) in img_prl_out_reset() argument
82 ctl = img_prl_out_readl(prl, IMG_PRL_OUT_CTL) & in img_prl_out_reset()
85 reset_control_assert(prl->rst); in img_prl_out_reset()
86 reset_control_deassert(prl->rst); in img_prl_out_reset()
88 img_prl_out_writel(prl, ctl, IMG_PRL_OUT_CTL); in img_prl_out_reset()
94 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); in img_prl_out_trigger() local
101 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL); in img_prl_out_trigger()
103 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL); in img_prl_out_trigger()
108 img_prl_out_reset(prl); in img_prl_out_trigger()
120 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); in img_prl_out_hw_params() local
140 clk_set_rate(prl->clk_ref, rate * 256); in img_prl_out_hw_params()
142 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL); in img_prl_out_hw_params()
144 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL); in img_prl_out_hw_params()
151 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); in img_prl_out_set_fmt() local
165 ret = pm_runtime_resume_and_get(prl->dev); in img_prl_out_set_fmt()
169 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL); in img_prl_out_set_fmt()
171 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL); in img_prl_out_set_fmt()
172 pm_runtime_put(prl->dev); in img_prl_out_set_fmt()
179 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); in img_prl_out_dai_probe() local
181 snd_soc_dai_init_dma_data(dai, &prl->dma_data, NULL); in img_prl_out_dai_probe()
210 struct img_prl_out *prl; in img_prl_out_probe() local
216 prl = devm_kzalloc(&pdev->dev, sizeof(*prl), GFP_KERNEL); in img_prl_out_probe()
217 if (!prl) in img_prl_out_probe()
220 platform_set_drvdata(pdev, prl); in img_prl_out_probe()
222 prl->dev = &pdev->dev; in img_prl_out_probe()
228 prl->base = base; in img_prl_out_probe()
230 prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst"); in img_prl_out_probe()
231 if (IS_ERR(prl->rst)) in img_prl_out_probe()
232 return dev_err_probe(&pdev->dev, PTR_ERR(prl->rst), in img_prl_out_probe()
235 prl->clk_sys = devm_clk_get(&pdev->dev, "sys"); in img_prl_out_probe()
236 if (IS_ERR(prl->clk_sys)) in img_prl_out_probe()
237 return dev_err_probe(dev, PTR_ERR(prl->clk_sys), in img_prl_out_probe()
240 prl->clk_ref = devm_clk_get(&pdev->dev, "ref"); in img_prl_out_probe()
241 if (IS_ERR(prl->clk_ref)) in img_prl_out_probe()
242 return dev_err_probe(dev, PTR_ERR(prl->clk_ref), in img_prl_out_probe()
245 ret = clk_prepare_enable(prl->clk_sys); in img_prl_out_probe()
249 img_prl_out_writel(prl, IMG_PRL_OUT_CTL_EDGE_MASK, IMG_PRL_OUT_CTL); in img_prl_out_probe()
250 img_prl_out_reset(prl); in img_prl_out_probe()
259 prl->dma_data.addr = res->start + IMG_PRL_OUT_TX_FIFO; in img_prl_out_probe()
260 prl->dma_data.addr_width = 4; in img_prl_out_probe()
261 prl->dma_data.maxburst = 4; in img_prl_out_probe()
280 clk_disable_unprepare(prl->clk_sys); in img_prl_out_probe()
287 struct img_prl_out *prl = platform_get_drvdata(pdev); in img_prl_out_dev_remove() local
293 clk_disable_unprepare(prl->clk_sys); in img_prl_out_dev_remove()