Lines Matching full:result

163 	int result;  in tle9104_transceive_frame()  local
191 result = spi_transceive_dt(&config->bus, &tx, &rx); in tle9104_transceive_frame()
192 if (result != 0) { in tle9104_transceive_frame()
193 LOG_ERR("spi_write failed with error %i", result); in tle9104_transceive_frame()
194 return result; in tle9104_transceive_frame()
234 int result; in tle9104_write_state_internal() local
265 result = gpio_pin_set_dt(&config->gpio_control[i], current_value); in tle9104_write_state_internal()
266 if (result != 0) { in tle9104_write_state_internal()
268 return result; in tle9104_write_state_internal()
273 result = tle9104_write_register(dev, TLE9104REGISTER_CTRL, register_ctrl); in tle9104_write_state_internal()
274 if (result != 0) { in tle9104_write_state_internal()
276 return result; in tle9104_write_state_internal()
288 int result; in tle9104_write_state() local
291 result = tle9104_write_state_internal(dev, state); in tle9104_write_state()
294 return result; in tle9104_write_state()
306 int result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_DIAGOUT12ON, 0x00, in tle9104_get_diagnostics_internal() local
308 if (result != 0) { in tle9104_get_diagnostics_internal()
309 return result; in tle9104_get_diagnostics_internal()
312 result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_DIAGOUT34ON, 0x00, &read_reg, in tle9104_get_diagnostics_internal()
314 if (result != 0) { in tle9104_get_diagnostics_internal()
315 return result; in tle9104_get_diagnostics_internal()
322 result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_DIAGOFF, 0x00, &read_reg, in tle9104_get_diagnostics_internal()
324 if (result != 0) { in tle9104_get_diagnostics_internal()
325 return result; in tle9104_get_diagnostics_internal()
332 result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_DIAGOFF, 0x00, &read_reg, in tle9104_get_diagnostics_internal()
334 if (result != 0) { in tle9104_get_diagnostics_internal()
335 return result; in tle9104_get_diagnostics_internal()
366 int result; in tle9104_get_diagnostics() local
369 result = tle9104_get_diagnostics_internal(dev, diag); in tle9104_get_diagnostics()
372 return result; in tle9104_get_diagnostics()
379 int result; in tle9104_clear_diagnostics_internal() local
381 result = tle9104_transceive_frame(dev, true, TLE9104REGISTER_DIAGOUT12ON, 0x00, &read_reg, in tle9104_clear_diagnostics_internal()
383 if (result != 0) { in tle9104_clear_diagnostics_internal()
384 return result; in tle9104_clear_diagnostics_internal()
387 result = tle9104_transceive_frame(dev, true, TLE9104REGISTER_DIAGOUT34ON, 0x00, &read_reg, in tle9104_clear_diagnostics_internal()
389 if (result != 0) { in tle9104_clear_diagnostics_internal()
390 return result; in tle9104_clear_diagnostics_internal()
393 result = tle9104_transceive_frame(dev, true, TLE9104REGISTER_DIAGOFF, 0x00, &read_reg, in tle9104_clear_diagnostics_internal()
395 if (result != 0) { in tle9104_clear_diagnostics_internal()
396 return result; in tle9104_clear_diagnostics_internal()
405 int result; in tle9104_clear_diagnostics() local
408 result = tle9104_clear_diagnostics_internal(dev); in tle9104_clear_diagnostics()
411 return result; in tle9104_clear_diagnostics()
422 int result; in tle9104_init() local
428 result = k_mutex_init(&data->lock); in tle9104_init()
429 if (result != 0) { in tle9104_init()
431 return result; in tle9104_init()
456 result = gpio_pin_configure_dt(current, GPIO_OUTPUT_INACTIVE); in tle9104_init()
457 if (result != 0) { in tle9104_init()
459 return result; in tle9104_init()
469 result = gpio_pin_configure_dt(&config->gpio_enable, GPIO_OUTPUT_ACTIVE); in tle9104_init()
470 if (result != 0) { in tle9104_init()
472 return result; in tle9104_init()
482 result = gpio_pin_configure_dt(&config->gpio_reset, GPIO_OUTPUT_ACTIVE); in tle9104_init()
483 if (result != 0) { in tle9104_init()
485 return result; in tle9104_init()
498 result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_GLOBALSTATUS, 0x00, &read_reg, in tle9104_init()
500 if (result != 0) { in tle9104_init()
501 return result; in tle9104_init()
514 result = tle9104_transceive_frame(dev, false, TLE9104REGISTER_GLOBALSTATUS, 0x00, &read_reg, in tle9104_init()
516 if (result != 0) { in tle9104_init()
517 return result; in tle9104_init()
544 result = tle9104_write_register(dev, TLE9104REGISTER_CFG, register_cfg); in tle9104_init()
545 if (result != 0) { in tle9104_init()
547 return result; in tle9104_init()
559 result = tle9104_write_register(dev, TLE9104REGISTER_OFFDIAGCFG, register_cfg); in tle9104_init()
560 if (result != 0) { in tle9104_init()
562 return result; in tle9104_init()
573 result = tle9104_write_register(dev, TLE9104REGISTER_ONDIAGCFG, register_cfg); in tle9104_init()
574 if (result != 0) { in tle9104_init()
576 return result; in tle9104_init()
583 result = tle9104_write_register(dev, TLE9104REGISTER_GLOBALSTATUS, register_globalstatus); in tle9104_init()
584 if (result != 0) { in tle9104_init()
586 return result; in tle9104_init()