Lines Matching refs:sequence
137 const struct adc_sequence *sequence) in adc_rpi_check_buffer_size() argument
145 if (mask & sequence->channels) { in adc_rpi_check_buffer_size()
151 if (sequence->options) { in adc_rpi_check_buffer_size()
152 needed *= (1 + sequence->options->extra_samplings); in adc_rpi_check_buffer_size()
155 if (sequence->buffer_size < needed) { in adc_rpi_check_buffer_size()
176 const struct adc_sequence *sequence) in adc_rpi_start_read() argument
182 if (sequence->resolution > ADC_RPI_MAX_RESOLUTION || in adc_rpi_start_read()
183 sequence->resolution == 0) { in adc_rpi_start_read()
184 LOG_ERR("unsupported resolution %d", sequence->resolution); in adc_rpi_start_read()
188 if (find_msb_set(sequence->channels) > config->num_channels) { in adc_rpi_start_read()
190 sequence->channels); in adc_rpi_start_read()
194 err = adc_rpi_check_buffer_size(dev, sequence); in adc_rpi_start_read()
200 data->buf = sequence->buffer; in adc_rpi_start_read()
201 adc_context_start_read(&data->ctx, sequence); in adc_rpi_start_read()
247 const struct adc_sequence *sequence, in adc_rpi_read_async() argument
254 err = adc_rpi_start_read(dev, sequence); in adc_rpi_read_async()
261 const struct adc_sequence *sequence) in adc_rpi_read() argument
263 return adc_rpi_read_async(dev, sequence, NULL); in adc_rpi_read()
271 data->channels = ctx->sequence.channels; in adc_context_start_sampling()