Lines Matching defs:prl

46 	struct img_prl_out *prl = dev_get_drvdata(dev);
48 clk_disable_unprepare(prl->clk_ref);
55 struct img_prl_out *prl = dev_get_drvdata(dev);
58 ret = clk_prepare_enable(prl->clk_ref);
67 static inline void img_prl_out_writel(struct img_prl_out *prl,
70 writel(val, prl->base + reg);
73 static inline u32 img_prl_out_readl(struct img_prl_out *prl, u32 reg)
75 return readl(prl->base + reg);
78 static void img_prl_out_reset(struct img_prl_out *prl)
82 ctl = img_prl_out_readl(prl, IMG_PRL_OUT_CTL) &
85 reset_control_assert(prl->rst);
86 reset_control_deassert(prl->rst);
88 img_prl_out_writel(prl, ctl, IMG_PRL_OUT_CTL);
94 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai);
101 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL);
103 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL);
108 img_prl_out_reset(prl);
120 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai);
140 clk_set_rate(prl->clk_ref, rate * 256);
142 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL);
144 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL);
151 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai);
165 ret = pm_runtime_get_sync(prl->dev);
167 pm_runtime_put_noidle(prl->dev);
171 reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL);
173 img_prl_out_writel(prl, reg, IMG_PRL_OUT_CTL);
174 pm_runtime_put(prl->dev);
187 struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai);
189 snd_soc_dai_init_dma_data(dai, &prl->dma_data, NULL);
206 .name = "img-prl-out"
211 struct img_prl_out *prl;
217 prl = devm_kzalloc(&pdev->dev, sizeof(*prl), GFP_KERNEL);
218 if (!prl)
221 platform_set_drvdata(pdev, prl);
223 prl->dev = &pdev->dev;
230 prl->base = base;
232 prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
233 if (IS_ERR(prl->rst)) {
234 if (PTR_ERR(prl->rst) != -EPROBE_DEFER)
236 return PTR_ERR(prl->rst);
239 prl->clk_sys = devm_clk_get(&pdev->dev, "sys");
240 if (IS_ERR(prl->clk_sys)) {
241 if (PTR_ERR(prl->clk_sys) != -EPROBE_DEFER)
243 return PTR_ERR(prl->clk_sys);
246 prl->clk_ref = devm_clk_get(&pdev->dev, "ref");
247 if (IS_ERR(prl->clk_ref)) {
248 if (PTR_ERR(prl->clk_ref) != -EPROBE_DEFER)
250 return PTR_ERR(prl->clk_ref);
253 ret = clk_prepare_enable(prl->clk_sys);
257 img_prl_out_writel(prl, IMG_PRL_OUT_CTL_EDGE_MASK, IMG_PRL_OUT_CTL);
258 img_prl_out_reset(prl);
267 prl->dma_data.addr = res->start + IMG_PRL_OUT_TX_FIFO;
268 prl->dma_data.addr_width = 4;
269 prl->dma_data.maxburst = 4;
288 clk_disable_unprepare(prl->clk_sys);
295 struct img_prl_out *prl = platform_get_drvdata(pdev);
301 clk_disable_unprepare(prl->clk_sys);