Lines Matching defs:spi
8 * Based on spi-sh.c:
25 #include <linux/spi/spi.h>
26 #include <linux/spi/rspi.h>
244 struct spi_device *spi, struct spi_transfer *xfer);
686 static bool rspi_can_dma(struct spi_controller *ctlr, struct spi_device *spi,
727 struct spi_device *spi, struct spi_transfer *xfer)
745 struct spi_device *spi,
863 struct spi_device *spi, struct spi_transfer *xfer)
868 if (spi->mode & SPI_LOOP) {
927 dev_err(&msg->spi->dev,
947 static int rspi_setup(struct spi_device *spi)
949 struct rspi_data *rspi = spi_controller_get_devdata(spi->controller);
952 if (spi->cs_gpiod)
959 if (spi->mode & SPI_CS_HIGH)
960 sslp |= SSLP_SSLP(spi->chip_select);
962 sslp &= ~SSLP_SSLP(spi->chip_select);
974 struct spi_device *spi = msg->spi;
988 rspi->speed_hz = spi->max_speed_hz;
995 if (spi->mode & SPI_CPOL)
997 if (spi->mode & SPI_CPHA)
999 if (spi->mode & SPI_LSB_FIRST)
1003 rspi->spcmd |= SPCMD_SSLA(spi->cs_gpiod ? rspi->ctlr->unused_native_cs
1004 : spi->chip_select);
1008 if (spi->mode & SPI_LOOP)
1013 if (msg->spi->mode &