Lines Matching refs:error
155 int error = 0; in adc_ambiq_start_read() local
167 error = adc_ambiq_check_buffer_size(sequence, active_channels); in adc_ambiq_start_read()
168 if (error < 0) { in adc_ambiq_start_read()
169 return error; in adc_ambiq_start_read()
181 error = adc_ambiq_slot_config(dev, sequence, channel_id, slot_index); in adc_ambiq_start_read()
182 if (error < 0) { in adc_ambiq_start_read()
183 return error; in adc_ambiq_start_read()
193 error = adc_context_wait_for_completion(&data->ctx); in adc_ambiq_start_read()
195 return error; in adc_ambiq_start_read()
201 int error = 0; in adc_ambiq_read() local
203 error = pm_device_runtime_get(dev); in adc_ambiq_read()
204 if (error < 0) { in adc_ambiq_read()
205 LOG_ERR("pm_device_runtime_get failed: %d", error); in adc_ambiq_read()
209 error = adc_ambiq_start_read(dev, sequence); in adc_ambiq_read()
210 adc_context_release(&data->ctx, error); in adc_ambiq_read()
212 int ret = error; in adc_ambiq_read()
214 error = pm_device_runtime_put(dev); in adc_ambiq_read()
215 if (error < 0) { in adc_ambiq_read()
216 LOG_ERR("pm_device_runtime_put failed: %d", error); in adc_ambiq_read()
219 error = ret; in adc_ambiq_read()
221 return error; in adc_ambiq_read()
335 int error = 0; in adc_ambiq_read_async() local
337 error = pm_device_runtime_get(dev); in adc_ambiq_read_async()
338 if (error < 0) { in adc_ambiq_read_async()
339 LOG_ERR("pm_device_runtime_get failed: %d", error); in adc_ambiq_read_async()
343 error = adc_ambiq_start_read(dev, sequence); in adc_ambiq_read_async()
344 adc_context_release(&data->ctx, error); in adc_ambiq_read_async()
346 int ret = error; in adc_ambiq_read_async()
348 error = pm_device_runtime_put(dev); in adc_ambiq_read_async()
349 if (error < 0) { in adc_ambiq_read_async()
350 LOG_ERR("pm_device_runtime_put failed: %d", error); in adc_ambiq_read_async()
353 error = ret; in adc_ambiq_read_async()
355 return error; in adc_ambiq_read_async()