Lines Matching refs:drvdata
112 static int sc7280_lpass_alloc_dma_channel(struct lpass_data *drvdata, in sc7280_lpass_alloc_dma_channel() argument
115 struct lpass_variant *v = drvdata->variant; in sc7280_lpass_alloc_dma_channel()
121 chan = find_first_zero_bit(&drvdata->dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
127 chan = find_next_zero_bit(&drvdata->dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
135 set_bit(chan, &drvdata->dma_ch_bit_map); in sc7280_lpass_alloc_dma_channel()
138 chan = find_first_zero_bit(&drvdata->hdmi_dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
142 set_bit(chan, &drvdata->hdmi_dma_ch_bit_map); in sc7280_lpass_alloc_dma_channel()
145 chan = find_first_zero_bit(&drvdata->rxtx_dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
151 chan = find_next_zero_bit(&drvdata->rxtx_dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
157 set_bit(chan, &drvdata->rxtx_dma_ch_bit_map); in sc7280_lpass_alloc_dma_channel()
160 chan = find_next_zero_bit(&drvdata->va_dma_ch_bit_map, in sc7280_lpass_alloc_dma_channel()
166 set_bit(chan, &drvdata->va_dma_ch_bit_map); in sc7280_lpass_alloc_dma_channel()
175 static int sc7280_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, unsigned int dai_id) in sc7280_lpass_free_dma_channel() argument
179 clear_bit(chan, &drvdata->dma_ch_bit_map); in sc7280_lpass_free_dma_channel()
182 clear_bit(chan, &drvdata->hdmi_dma_ch_bit_map); in sc7280_lpass_free_dma_channel()
186 clear_bit(chan, &drvdata->rxtx_dma_ch_bit_map); in sc7280_lpass_free_dma_channel()
189 clear_bit(chan, &drvdata->va_dma_ch_bit_map); in sc7280_lpass_free_dma_channel()
200 struct lpass_data *drvdata = platform_get_drvdata(pdev); in sc7280_lpass_init() local
201 struct lpass_variant *variant = drvdata->variant; in sc7280_lpass_init()
205 drvdata->clks = devm_kcalloc(dev, variant->num_clks, in sc7280_lpass_init()
206 sizeof(*drvdata->clks), GFP_KERNEL); in sc7280_lpass_init()
207 if (!drvdata->clks) in sc7280_lpass_init()
210 drvdata->num_clks = variant->num_clks; in sc7280_lpass_init()
212 for (i = 0; i < drvdata->num_clks; i++) in sc7280_lpass_init()
213 drvdata->clks[i].id = variant->clk_name[i]; in sc7280_lpass_init()
215 ret = devm_clk_bulk_get(dev, drvdata->num_clks, drvdata->clks); in sc7280_lpass_init()
221 ret = clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); in sc7280_lpass_init()
232 struct lpass_data *drvdata = platform_get_drvdata(pdev); in sc7280_lpass_exit() local
234 clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks); in sc7280_lpass_exit()