Lines Matching full:result

46 	int result;  in max11102_17_switch_channel()  local
61 result = spi_read_dt(&bus, &rx); in max11102_17_switch_channel()
62 if (result != 0) { in max11102_17_switch_channel()
63 LOG_ERR("read failed with error %i", result); in max11102_17_switch_channel()
64 return result; in max11102_17_switch_channel()
69 result = spi_read_dt(&config->bus, &rx); in max11102_17_switch_channel()
70 if (result != 0) { in max11102_17_switch_channel()
71 LOG_ERR("read failed with error %i", result); in max11102_17_switch_channel()
72 return result; in max11102_17_switch_channel()
193 int result; in max11102_17_adc_start_read() local
196 result = max11102_17_validate_sequence(dev, sequence); in max11102_17_adc_start_read()
198 if (result != 0) { in max11102_17_adc_start_read()
200 return result; in max11102_17_adc_start_read()
208 result = adc_context_wait_for_completion(&data->ctx); in max11102_17_adc_start_read()
211 return result; in max11102_17_adc_start_read()
217 int result; in max11102_17_read_sample() local
229 result = spi_read_dt(&config->bus, &rx); in max11102_17_read_sample()
231 if (result != 0) { in max11102_17_read_sample()
232 LOG_ERR("read failed with error %i", result); in max11102_17_read_sample()
233 return result; in max11102_17_read_sample()
248 int result; in max11102_17_adc_perform_read() local
259 result = max11102_17_read_sample(dev, data->buffer); in max11102_17_adc_perform_read()
260 if (result != 0) { in max11102_17_adc_perform_read()
262 adc_context_complete(&data->ctx, result); in max11102_17_adc_perform_read()
263 return result; in max11102_17_adc_perform_read()
270 return result; in max11102_17_adc_perform_read()
277 int result; in max11102_17_adc_read_async() local
281 result = max11102_17_adc_start_read(dev, sequence, true); in max11102_17_adc_read_async()
282 adc_context_release(&data->ctx, result); in max11102_17_adc_read_async()
284 return result; in max11102_17_adc_read_async()
289 int result; in max11102_17_read() local
293 result = max11102_17_adc_start_read(dev, sequence, true); in max11102_17_read()
294 adc_context_release(&data->ctx, result); in max11102_17_read()
296 return result; in max11102_17_read()
302 int result; in max11102_17_read() local
306 result = max11102_17_adc_start_read(dev, sequence, false); in max11102_17_read()
308 while (result == 0 && k_sem_take(&data->ctx.sync, K_NO_WAIT) != 0) { in max11102_17_read()
309 result = max11102_17_adc_perform_read(dev); in max11102_17_read()
312 adc_context_release(&data->ctx, result); in max11102_17_read()
313 return result; in max11102_17_read()
328 int result; in max11102_17_init() local
355 result = gpio_pin_configure_dt(&config->gpio_chsel, GPIO_OUTPUT_INACTIVE); in max11102_17_init()
356 if (result != 0) { in max11102_17_init()
358 return result; in max11102_17_init()
377 result = max11102_17_read_sample(dev, &sample); in max11102_17_init()
378 if (result != 0) { in max11102_17_init()
380 return result; in max11102_17_init()
385 return result; in max11102_17_init()