Lines Matching refs:sequence
151 if (ctx->sequence.calibrate) { in adc_context_start_sampling()
175 static int check_buffer_size(const struct adc_sequence *sequence, in check_buffer_size() argument
181 if (sequence->options) { in check_buffer_size()
182 needed_buffer_size *= (1 + sequence->options->extra_samplings); in check_buffer_size()
185 if (sequence->buffer_size < needed_buffer_size) { in check_buffer_size()
187 sequence->buffer_size, needed_buffer_size); in check_buffer_size()
195 const struct adc_sequence *sequence) in start_read() argument
200 if (sequence->oversampling > 7U) { in start_read()
205 if ((sequence->channels == 0) || in start_read()
206 ((sequence->channels & ~BIT_MASK(SMARTBOND_ADC_CHANNEL_COUNT)) != 0)) { in start_read()
211 if (sequence->resolution < 8 || sequence->resolution > 15) { in start_read()
213 sequence->resolution); in start_read()
217 error = check_buffer_size(sequence, 1); in start_read()
222 data->buffer = sequence->buffer; in start_read()
223 data->channel_read_mask = sequence->channels; in start_read()
224 data->sequence_channel_count = pop_count(sequence->channels); in start_read()
227 adc_context_start_read(&data->ctx, sequence); in start_read()
241 (16 - data->ctx.sequence.resolution); in adc_smartbond_isr()
257 const struct adc_sequence *sequence) in adc_smartbond_read() argument
264 error = start_read(dev, sequence); in adc_smartbond_read()
273 const struct adc_sequence *sequence, in adc_smartbond_read_async() argument
281 error = start_read(dev, sequence); in adc_smartbond_read_async()