/* This is only called once at the beginning of all the conversions, all channels as a group.  */
static void adc_context_start_sampling(struct adc_context *ctx)
/* This is only called once at the beginning of all the conversions, all channels as a group.  */
static void adc_context_start_sampling(struct adc_context *ctx)
{
	struct adc_sam_data *data = CONTAINER_OF(ctx, struct adc_sam_data, ctx);
	const struct adc_sam_config *const cfg = data->dev->config;
	Adc *const adc = cfg->regs;
	data->num_active_channels = count_bits(ctx->sequence.channels);
	adc->ADC_CHDR = 0xffff;
	adc->ADC_CHER = ctx->sequence.channels;
	LOG_DBG("Starting conversion for %u channels", data->num_active_channels);
	adc_sam_start_conversion(data->dev);
}