Lines Matching defs:spi
18 #include <linux/spi/spi.h>
19 #include <linux/spi/spi_bitbang.h>
20 #include <linux/spi/xilinx_spi.h>
186 static void xilinx_spi_chipselect(struct spi_device *spi, int is_on)
188 struct xilinx_spi *xspi = spi_controller_get_devdata(spi->controller);
200 if (spi->mode & SPI_CPHA)
202 if (spi->mode & SPI_CPOL)
204 if (spi->mode & SPI_LSB_FIRST)
206 if (spi->mode & SPI_LOOP)
210 /* We do not check spi->max_speed_hz here as the SPI clock
216 cs ^= BIT(spi_get_chipselect(spi, 0));
225 static int xilinx_spi_setup_transfer(struct spi_device *spi,
228 struct xilinx_spi *xspi = spi_controller_get_devdata(spi->controller);
230 if (spi->mode & SPI_CS_HIGH)
231 xspi->cs_inactive &= ~BIT(spi_get_chipselect(spi, 0));
233 xspi->cs_inactive |= BIT(spi_get_chipselect(spi, 0));
238 static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
240 struct xilinx_spi *xspi = spi_controller_get_devdata(spi->controller);
307 dev_err(&spi->dev,
383 { .compatible = "xlnx,axi-quad-spi-1.00.a", },
384 { .compatible = "xlnx,xps-spi-2.00.a", },
385 { .compatible = "xlnx,xps-spi-2.00.b", },
423 dev_err(&pdev->dev, "Invalid number of spi targets\n");
431 /* the spi->mode bits understood by this driver: */