Lines Matching defs:spi
42 #include <linux/spi/spi.h>
43 #include <linux/spi/spi_bitbang.h>
174 static void uwire_chipselect(struct spi_device *spi, int value)
176 struct uwire_state *ust = spi->controller_state;
185 if (value == BITBANG_CS_INACTIVE || old_cs != spi->chip_select) {
194 if (spi->mode & SPI_CPOL)
199 w = spi->chip_select << 10;
205 static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
216 w = spi->chip_select << 10;
239 dev_name(&spi->dev), bits, val);
299 dev_name(&spi->dev), bits, val);
309 static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
311 struct uwire_state *ust = spi->controller_state;
321 uwire = spi_master_get_devdata(spi->master);
327 if (spi->mode & SPI_CS_HIGH)
330 if (spi->mode & SPI_CPOL)
333 switch (spi->mode & (SPI_CPOL | SPI_CPHA)) {
350 hz = spi->max_speed_hz;
353 pr_debug("%s: zero speed?\n", dev_name(&spi->dev));
381 dev_name(&spi->dev), rate / 10 / 8, hz);
414 omap_uwire_configure_mode(spi->chip_select, flags);
424 static int uwire_setup(struct spi_device *spi)
426 struct uwire_state *ust = spi->controller_state;
434 spi->controller_state = ust;
438 status = uwire_setup_transfer(spi, NULL);
445 static void uwire_cleanup(struct spi_device *spi)
447 kfree(spi->controller_state);
494 /* the spi->mode bits understood by this driver: */