Lines Matching defs:spi
42 #include <linux/spi/spi.h>
43 #include <linux/spi/spi_bitbang.h>
171 static void uwire_chipselect(struct spi_device *spi, int value)
173 struct uwire_state *ust = spi->controller_state;
182 if (value == BITBANG_CS_INACTIVE || old_cs != spi_get_chipselect(spi, 0)) {
191 if (spi->mode & SPI_CPOL)
196 w = spi_get_chipselect(spi, 0) << 10;
202 static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
213 w = spi_get_chipselect(spi, 0) << 10;
236 dev_name(&spi->dev), bits, val);
296 dev_name(&spi->dev), bits, val);
306 static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
308 struct uwire_state *ust = spi->controller_state;
318 uwire = spi_controller_get_devdata(spi->controller);
324 if (spi->mode & SPI_CS_HIGH)
327 if (spi->mode & SPI_CPOL)
330 switch (spi->mode & SPI_MODE_X_MASK) {
347 hz = spi->max_speed_hz;
350 pr_debug("%s: zero speed?\n", dev_name(&spi->dev));
378 dev_name(&spi->dev), rate / 10 / 8, hz);
411 omap_uwire_configure_mode(spi_get_chipselect(spi, 0), flags);
421 static int uwire_setup(struct spi_device *spi)
423 struct uwire_state *ust = spi->controller_state;
431 spi->controller_state = ust;
435 status = uwire_setup_transfer(spi, NULL);
442 static void uwire_cleanup(struct spi_device *spi)
444 kfree(spi->controller_state);
486 /* the spi->mode bits understood by this driver: */