Lines Matching refs:sequence

157 	if (ctx->sequence.calibrate) {  in adc_context_start_sampling()
164 val |= (ctx->sequence.oversampling - 7) << SDADC_SDADC_CTRL_REG_SDADC_OSR_Pos; in adc_context_start_sampling()
181 static int check_buffer_size(const struct adc_sequence *sequence, in check_buffer_size() argument
187 if (sequence->options) { in check_buffer_size()
188 needed_buffer_size *= (1 + sequence->options->extra_samplings); in check_buffer_size()
191 if (sequence->buffer_size < needed_buffer_size) { in check_buffer_size()
193 sequence->buffer_size, needed_buffer_size); in check_buffer_size()
201 const struct adc_sequence *sequence) in start_read() argument
206 if (sequence->oversampling < 7U || sequence->oversampling > 10) { in start_read()
211 if ((sequence->channels == 0) || in start_read()
212 ((sequence->channels & ~BIT_MASK(SMARTBOND_SDADC_CHANNEL_COUNT)) != 0)) { in start_read()
217 if (sequence->resolution < 8 || sequence->resolution > 15) { in start_read()
219 sequence->resolution); in start_read()
223 error = check_buffer_size(sequence, 1); in start_read()
228 data->buffer = sequence->buffer; in start_read()
229 data->channel_read_mask = sequence->channels; in start_read()
230 data->sequence_channel_count = pop_count(sequence->channels); in start_read()
233 adc_context_start_read(&data->ctx, sequence); in start_read()
247 (16 - data->ctx.sequence.resolution); in sdadc_smartbond_isr()
263 const struct adc_sequence *sequence) in sdadc_smartbond_read() argument
270 error = start_read(dev, sequence); in sdadc_smartbond_read()
279 const struct adc_sequence *sequence, in sdadc_smartbond_read_async() argument
287 error = start_read(dev, sequence); in sdadc_smartbond_read_async()