Lines Matching refs:width
214 unsigned int end, unsigned int width) in find_free_channels() argument
219 for (pos = start; pos < end + 1; pos = ALIGN(pos, width)) { in find_free_channels()
221 if (pos + width > end + 1) in find_free_channels()
224 if (pos & (width - 1)) in find_free_channels()
227 for (i = 1; i < width && !test_bit(pos + i, bitmap); i++) in find_free_channels()
229 if (i == width) in find_free_channels()
237 stm_find_master_chan(struct stm_device *stm, unsigned int width, in stm_find_master_chan() argument
258 width); in stm_find_master_chan()
270 static int stm_output_assign(struct stm_device *stm, unsigned int width, in stm_output_assign() argument
277 if (width > stm->data->sw_nchannels) in stm_output_assign()
295 ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend); in stm_output_assign()
301 output->nr_chans = width; in stm_output_assign()
303 dev_dbg(&stm->dev, "assigned %u:%u (+%u)\n", midx, cidx, width); in stm_output_assign()
368 static int stm_file_assign(struct stm_file *stmf, char *id, unsigned int width) in stm_file_assign() argument
375 ret = stm_output_assign(stm, width, stmf->policy_node, &stmf->output); in stm_file_assign()
504 if (id->width < 1 || in stm_char_policy_set_ioctl()
505 id->width > PAGE_SIZE / stm->data->sw_mmiosz) in stm_char_policy_set_ioctl()
508 ret = stm_file_assign(stmf, id->id, id->width); in stm_char_policy_set_ioctl()
535 .width = stmf->output.nr_chans, in stm_char_policy_get_ioctl()