Lines Matching refs:sequence
81 const struct adc_sequence *sequence) in mcp320x_validate_buffer_size() argument
89 if (mask & sequence->channels) { in mcp320x_validate_buffer_size()
95 if (sequence->options) { in mcp320x_validate_buffer_size()
96 needed *= (1 + sequence->options->extra_samplings); in mcp320x_validate_buffer_size()
99 if (sequence->buffer_size < needed) { in mcp320x_validate_buffer_size()
107 const struct adc_sequence *sequence) in mcp320x_start_read() argument
113 if (sequence->resolution != MCP320X_RESOLUTION) { in mcp320x_start_read()
114 LOG_ERR("unsupported resolution %d", sequence->resolution); in mcp320x_start_read()
118 if (find_msb_set(sequence->channels) > config->channels) { in mcp320x_start_read()
120 sequence->channels); in mcp320x_start_read()
124 err = mcp320x_validate_buffer_size(dev, sequence); in mcp320x_start_read()
130 data->buffer = sequence->buffer; in mcp320x_start_read()
131 adc_context_start_read(&data->ctx, sequence); in mcp320x_start_read()
137 const struct adc_sequence *sequence, in mcp320x_read_async() argument
144 err = mcp320x_start_read(dev, sequence); in mcp320x_read_async()
151 const struct adc_sequence *sequence) in mcp320x_read() argument
153 return mcp320x_read_async(dev, sequence, NULL); in mcp320x_read()
160 data->channels = ctx->sequence.channels; in adc_context_start_sampling()