Lines Matching refs:spi
22 #include <linux/spi/spi.h>
125 static int stmp_spi_setup_transfer(struct spi_device *spi,
130 struct stmp_spi *ss = spi_master_get_devdata(spi->master);
133 bits_per_word = spi->bits_per_word;
144 if (spi->max_speed_hz)
145 hz = min(hz, spi->max_speed_hz);
150 dev_err(&spi->dev, "Cannot continue with zero clock\n");
155 dev_err(&spi->dev, "%s, unsupported bits_per_word=%d\n",
160 dev_dbg(&spi->dev, "Requested clk rate = %uHz, max = %uHz/%d = %uHz\n",
165 dev_err(&spi->dev, "%s, unsupported clock rate %uHz\n",
178 ((spi->mode & SPI_CPOL) ? BM_SSP_CTRL1_POLARITY : 0) |
179 ((spi->mode & SPI_CPHA) ? BM_SSP_CTRL1_PHASE : 0) |
186 static int stmp_spi_setup(struct spi_device *spi)
191 if (spi->bits_per_word != 8) {
192 dev_err(&spi->dev, "%s, unsupported bits_per_word=%d\n",
193 __func__, spi->bits_per_word);
327 cs = m->spi->chip_select;
335 stmp_spi_setup_transfer(m->spi, t);
339 dev_err(&m->spi->dev,
414 * @spi: spi device
417 static int stmp_spi_transfer(struct spi_device *spi, struct spi_message *m)
419 struct stmp_spi *ss = spi_master_get_devdata(spi->master);
497 /* the spi->mode bits understood by this driver: */
563 dev_dbg(&dev->dev, "cannot register spi master, %d\n", err);