Lines Matching refs:spi

68 	struct spi_dt_spec spi;  member
149 static int fs26_spi_transceive(const struct spi_dt_spec *spi, in fs26_spi_transceive() argument
187 retval = spi_transceive_dt(spi, &spi_tx_set, &spi_rx_set); in fs26_spi_transceive()
222 static int fs26_getreg(const struct spi_dt_spec *spi, uint8_t addr, in fs26_getreg() argument
231 return fs26_spi_transceive(spi, &tx_frame, rx_frame); in fs26_getreg()
243 static int fs26_setreg(const struct spi_dt_spec *spi, uint8_t addr, uint16_t regval) in fs26_setreg() argument
251 return fs26_spi_transceive(spi, &tx_frame, NULL); in fs26_setreg()
287 if (fs26_setreg(&config->spi, FS26_FS_WD_ANSWER, data->token) == 0) { in fs26_wd_refresh()
295 if (fs26_getreg(&config->spi, FS26_FS_WD_TOKEN, &rx_frame)) { in fs26_wd_refresh()
303 if (fs26_setreg(&config->spi, FS26_FS_WD_ANSWER, answer)) { in fs26_wd_refresh()
316 if (!fs26_getreg(&config->spi, FS26_FS_GRL_FLAGS, &rx_frame)) { in fs26_wd_refresh()
318 if (!fs26_getreg(&config->spi, FS26_FS_DIAG_SAFETY1, &rx_frame)) { in fs26_wd_refresh()
348 if (!fs26_getreg(&config->spi, FS26_FS_STATES, &rx_frame)) { in fs26_poll_for_init_fs_state()
378 if (!fs26_getreg(&config->spi, FS26_FS_STATES, &rx_frame)) { in fs26_goto_init_fs_state()
386 fs26_setreg(&config->spi, FS26_FS_SAFE_IOS_1, (uint32_t)FS_GOTO_INIT); in fs26_goto_init_fs_state()
449 fs26_setreg(&config->spi, FS26_FS_I_WD_CFG, regval); in wdt_nxp_fs26_setup()
450 fs26_setreg(&config->spi, FS26_FS_I_NOT_WD_CFG, ~regval); in wdt_nxp_fs26_setup()
457 fs26_setreg(&config->spi, FS26_FS_WDW_DURATION, regval); in wdt_nxp_fs26_setup()
458 fs26_setreg(&config->spi, FS26_FS_NOT_WDW_DURATION, ~regval); in wdt_nxp_fs26_setup()
553 if (fs26_getreg(&config->spi, FS26_FS_WDW_DURATION, &rx_frame)) { in wdt_nxp_fs26_disable()
568 fs26_setreg(&config->spi, FS26_FS_WDW_DURATION, regval); in wdt_nxp_fs26_disable()
569 fs26_setreg(&config->spi, FS26_FS_NOT_WDW_DURATION, ~regval); in wdt_nxp_fs26_disable()
597 if ((!fs26_getreg(&config->spi, FS26_FS_GRL_FLAGS, &rx_frame)) in wdt_nxp_fs26_int_thread()
600 if ((!fs26_getreg(&config->spi, FS26_FS_DIAG_SAFETY1, &rx_frame)) in wdt_nxp_fs26_int_thread()
605 fs26_setreg(&config->spi, FS26_FS_DIAG_SAFETY1, regval); in wdt_nxp_fs26_int_thread()
637 if (!spi_is_ready_dt(&config->spi)) { in wdt_nxp_fs26_init()
674 if (fs26_getreg(&config->spi, FS26_FS_DIAG_SAFETY1, &rx_frame)) { in wdt_nxp_fs26_init()
686 if (fs26_getreg(&config->spi, FS26_FS_STATES, &rx_frame)) { in wdt_nxp_fs26_init()
695 fs26_setreg(&config->spi, FS26_FS_STATES, regval); in wdt_nxp_fs26_init()
711 fs26_setreg(&config->spi, FS26_FS_DIAG_SAFETY1, regval); in wdt_nxp_fs26_init()
729 fs26_setreg(&config->spi, FS26_FS_I_OVUV_SAFE_REACTION1, regval); in wdt_nxp_fs26_init()
730 fs26_setreg(&config->spi, FS26_FS_I_NOT_OVUV_SAFE_REACTION1, ~regval); in wdt_nxp_fs26_init()
742 fs26_setreg(&config->spi, FS26_FS_I_OVUV_SAFE_REACTION2, regval); in wdt_nxp_fs26_init()
743 fs26_setreg(&config->spi, FS26_FS_I_NOT_OVUV_SAFE_REACTION2, ~regval); in wdt_nxp_fs26_init()
748 fs26_setreg(&config->spi, FS26_FS_I_SAFE_INPUTS, regval); in wdt_nxp_fs26_init()
749 fs26_setreg(&config->spi, FS26_FS_I_NOT_SAFE_INPUTS, ~regval); in wdt_nxp_fs26_init()
754 fs26_setreg(&config->spi, FS26_FS_I_FSSM, regval); in wdt_nxp_fs26_init()
755 fs26_setreg(&config->spi, FS26_FS_I_NOT_FSSM, ~regval); in wdt_nxp_fs26_init()
762 fs26_setreg(&config->spi, FS26_FS_I_WD_CFG, regval); in wdt_nxp_fs26_init()
763 fs26_setreg(&config->spi, FS26_FS_I_NOT_WD_CFG, ~regval); in wdt_nxp_fs26_init()
769 fs26_setreg(&config->spi, FS26_FS_WDW_DURATION, regval); in wdt_nxp_fs26_init()
770 fs26_setreg(&config->spi, FS26_FS_NOT_WDW_DURATION, ~regval); in wdt_nxp_fs26_init()
775 fs26_setreg(&config->spi, FS26_FS_WD_TOKEN, data->token); in wdt_nxp_fs26_init()
780 fs26_setreg(&config->spi, FS26_FS_INTB_MASK, regval); in wdt_nxp_fs26_init()
784 fs26_setreg(&config->spi, FS26_M_TSD_MSK, regval); in wdt_nxp_fs26_init()
785 fs26_setreg(&config->spi, FS26_M_REG_MSK, regval); in wdt_nxp_fs26_init()
786 fs26_setreg(&config->spi, FS26_M_VSUP_MSK, regval); in wdt_nxp_fs26_init()
787 fs26_setreg(&config->spi, FS26_M_WIO_MSK, regval); in wdt_nxp_fs26_init()
788 fs26_setreg(&config->spi, FS26_M_COM_MSK, regval); in wdt_nxp_fs26_init()
797 if (!fs26_getreg(&config->spi, FS26_FS_STATES, &rx_frame)) { in wdt_nxp_fs26_init()
827 .spi = SPI_DT_SPEC_INST_GET(n, \