Lines Matching +full:long +full:- +full:line +full:- +full:mode

4  * SPDX-License-Identifier: Apache-2.0
38 return -ENOTSUP; in spi_config()
42 return -ENOTSUP; in spi_config()
46 return -ENOTSUP; in spi_config()
50 div = (SPI_CFG(dev)->f_sys / (frequency * 2U)) - 1; in spi_config()
77 return -ENOTSUP; in spi_config()
87 return -ENOTSUP; in spi_config()
89 /* Set single line operation */ in spi_config()
129 struct spi_context *ctx = &SPI_DATA(dev)->ctx; in spi_sifive_xfer()
136 /* As long as frames remain to be sent, attempt to queue them on Tx FIFO. If in spi_sifive_xfer()
142 txd = *ctx->tx_buf; in spi_sifive_xfer()
156 *ctx->rx_buf = rxd; in spi_sifive_xfer()
158 queued_frames--; in spi_sifive_xfer()
163 /* Deassert the CS line */ in spi_sifive_xfer()
165 spi_context_cs_control(&SPI_DATA(dev)->ctx, false); in spi_sifive_xfer()
179 struct spi_sifive_cfg *cfg = (struct spi_sifive_cfg *)dev->config; in spi_sifive_init()
181 /* Disable SPI Flash mode */ in spi_sifive_init()
184 err = spi_context_cs_configure_all(&SPI_DATA(dev)->ctx); in spi_sifive_init()
190 err = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); in spi_sifive_init()
197 spi_context_unlock_unconditionally(&SPI_DATA(dev)->ctx); in spi_sifive_init()
210 spi_context_lock(&SPI_DATA(dev)->ctx, false, NULL, NULL, config); in spi_sifive_transceive()
213 SPI_DATA(dev)->ctx.config = config; in spi_sifive_transceive()
217 * SPI peripheral itself to control the CS line in spi_sifive_transceive()
237 sys_write32(config->slave, SPI_REG(dev, REG_CSID)); in spi_sifive_transceive()
241 rc = spi_config(dev, config->frequency, config->operation); in spi_sifive_transceive()
243 spi_context_release(&SPI_DATA(dev)->ctx, rc); in spi_sifive_transceive()
247 spi_context_buffers_setup(&SPI_DATA(dev)->ctx, tx_bufs, rx_bufs, 1); in spi_sifive_transceive()
249 /* Assert the CS line */ in spi_sifive_transceive()
251 spi_context_cs_control(&SPI_DATA(dev)->ctx, true); in spi_sifive_transceive()
259 rc = spi_context_wait_for_completion(&SPI_DATA(dev)->ctx); in spi_sifive_transceive()
261 spi_context_release(&SPI_DATA(dev)->ctx, rc); in spi_sifive_transceive()
269 spi_context_unlock_unconditionally(&SPI_DATA(dev)->ctx); in spi_sifive_release()