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_get_sync(prl->dev); in img_prl_out_set_fmt()
167 pm_runtime_put_noidle(prl->dev); in img_prl_out_set_fmt()
171 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL); in img_prl_out_set_fmt()
173 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL); in img_prl_out_set_fmt()
174 pm_runtime_put(prl->dev); in img_prl_out_set_fmt()
187 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); in img_prl_out_dai_probe() local
189 snd_soc_dai_init_dma_data(dai, &prl->dma_data, NULL); in img_prl_out_dai_probe()
211 struct img_prl_out *prl; in img_prl_out_probe() local
217 prl = devm_kzalloc(&pdev->dev, sizeof(*prl), GFP_KERNEL); in img_prl_out_probe()
218 if (!prl) in img_prl_out_probe()
221 platform_set_drvdata(pdev, prl); in img_prl_out_probe()
223 prl->dev = &pdev->dev; in img_prl_out_probe()
230 prl->base = base; in img_prl_out_probe()
232 prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst"); in img_prl_out_probe()
233 if (IS_ERR(prl->rst)) { in img_prl_out_probe()
234 if (PTR_ERR(prl->rst) != -EPROBE_DEFER) in img_prl_out_probe()
236 return PTR_ERR(prl->rst); in img_prl_out_probe()
239 prl->clk_sys = devm_clk_get(&pdev->dev, "sys"); in img_prl_out_probe()
240 if (IS_ERR(prl->clk_sys)) { in img_prl_out_probe()
241 if (PTR_ERR(prl->clk_sys) != -EPROBE_DEFER) in img_prl_out_probe()
243 return PTR_ERR(prl->clk_sys); in img_prl_out_probe()
246 prl->clk_ref = devm_clk_get(&pdev->dev, "ref"); in img_prl_out_probe()
247 if (IS_ERR(prl->clk_ref)) { in img_prl_out_probe()
248 if (PTR_ERR(prl->clk_ref) != -EPROBE_DEFER) in img_prl_out_probe()
250 return PTR_ERR(prl->clk_ref); in img_prl_out_probe()
253 ret = clk_prepare_enable(prl->clk_sys); in img_prl_out_probe()
257 img_prl_out_writel(prl, IMG_PRL_OUT_CTL_EDGE_MASK, IMG_PRL_OUT_CTL); in img_prl_out_probe()
258 img_prl_out_reset(prl); in img_prl_out_probe()
267 prl->dma_data.addr = res->start + IMG_PRL_OUT_TX_FIFO; in img_prl_out_probe()
268 prl->dma_data.addr_width = 4; in img_prl_out_probe()
269 prl->dma_data.maxburst = 4; in img_prl_out_probe()
288 clk_disable_unprepare(prl->clk_sys); in img_prl_out_probe()
295 struct img_prl_out *prl = platform_get_drvdata(pdev); in img_prl_out_dev_remove() local
301 clk_disable_unprepare(prl->clk_sys); in img_prl_out_dev_remove()