Lines Matching refs:tcan_config

242 	const struct tcan4x5x_config *tcan_config = mcan_config->custom;  in tcan4x5x_read()  local
275 err = spi_transceive_dt(&tcan_config->spi, &tx, &rx); in tcan4x5x_read()
293 const struct tcan4x5x_config *tcan_config = mcan_config->custom; in tcan4x5x_write() local
329 err = spi_transceive_dt(&tcan_config->spi, &tx, &rx); in tcan4x5x_write()
396 const struct tcan4x5x_config *tcan_config = mcan_config->custom; in tcan4x5x_get_core_clock() local
398 *rate = tcan_config->clk_freq; in tcan4x5x_get_core_clock()
475 const struct tcan4x5x_config *tcan_config = mcan_config->custom; in tcan4x5x_wake() local
480 if (tcan_config->wake_gpio.port != NULL && tcan_config->nwkrq_gpio.port != NULL) { in tcan4x5x_wake()
481 wake_needed = gpio_pin_get_dt(&tcan_config->nwkrq_gpio); in tcan4x5x_wake()
489 if (tcan_config->wake_gpio.port != NULL && wake_needed != 0) { in tcan4x5x_wake()
490 err = gpio_pin_set_dt(&tcan_config->wake_gpio, 1); in tcan4x5x_wake()
498 err = gpio_pin_set_dt(&tcan_config->wake_gpio, 0); in tcan4x5x_wake()
512 const struct tcan4x5x_config *tcan_config = mcan_config->custom; in tcan4x5x_reset() local
521 if (tcan_config->rst_gpio.port != NULL) { in tcan4x5x_reset()
522 err = gpio_pin_set_dt(&tcan_config->rst_gpio, 1); in tcan4x5x_reset()
530 err = gpio_pin_set_dt(&tcan_config->rst_gpio, 0); in tcan4x5x_reset()
555 const struct tcan4x5x_config *tcan_config = mcan_config->custom; in tcan4x5x_init() local
565 if (!spi_is_ready_dt(&tcan_config->spi)) { in tcan4x5x_init()
571 if (tcan_config->rst_gpio.port != NULL) { in tcan4x5x_init()
572 if (!gpio_is_ready_dt(&tcan_config->rst_gpio)) { in tcan4x5x_init()
577 err = gpio_pin_configure_dt(&tcan_config->rst_gpio, GPIO_OUTPUT_INACTIVE); in tcan4x5x_init()
586 if (tcan_config->nwkrq_gpio.port != NULL) { in tcan4x5x_init()
587 if (!gpio_is_ready_dt(&tcan_config->nwkrq_gpio)) { in tcan4x5x_init()
592 err = gpio_pin_configure_dt(&tcan_config->nwkrq_gpio, GPIO_INPUT); in tcan4x5x_init()
601 if (tcan_config->wake_gpio.port != NULL) { in tcan4x5x_init()
602 if (!gpio_is_ready_dt(&tcan_config->wake_gpio)) { in tcan4x5x_init()
607 err = gpio_pin_configure_dt(&tcan_config->wake_gpio, GPIO_OUTPUT_INACTIVE); in tcan4x5x_init()
615 if (!gpio_is_ready_dt(&tcan_config->int_gpio)) { in tcan4x5x_init()
620 err = gpio_pin_configure_dt(&tcan_config->int_gpio, GPIO_INPUT); in tcan4x5x_init()
627 BIT(tcan_config->int_gpio.pin)); in tcan4x5x_init()
629 err = gpio_add_callback_dt(&tcan_config->int_gpio, &tcan_data->int_gpio_cb); in tcan4x5x_init()
636 err = gpio_pin_interrupt_configure_dt(&tcan_config->int_gpio, GPIO_INT_EDGE_TO_ACTIVE); in tcan4x5x_init()
683 if (tcan_config->clk_freq == MHZ(20)) { in tcan4x5x_init()