Lines Matching defs:spi
9 #include <linux/spi/spi.h>
13 * master to access the registers of the spi slave chip which has an
16 * The "SPI slave to Avalon Master Bridge" (spi-avmm) IP should be integrated
17 * in the spi slave chip. The IP acts as a bridge to convert encoded streams of
46 * The spi-avmm IP on the slave chip decodes the byte stream and initiates
145 * @spi: spi slave associated with this bridge.
146 * @word_len: bytes of word for spi transfer.
154 * requires the driver to issue formatted requests to spi slave to AVMM bus
158 struct spi_device *spi;
314 /* Store valid phy data length for spi transfer */
347 /* reorder words for spi transfer */
352 return spi_write(br->spi, br->phy_buf, br->phy_len);
369 struct device *dev = &br->spi->dev;
378 ret = spi_read(br->spi, pb, br->word_len);
623 spi_avmm_bridge_ctx_gen(struct spi_device *spi)
627 if (!spi)
631 spi->mode = SPI_MODE_1;
632 spi->bits_per_word = 32;
633 if (spi_setup(spi)) {
634 spi->bits_per_word = 8;
635 if (spi_setup(spi))
643 br->spi = spi;
644 br->word_len = spi->bits_per_word / 8;
673 struct regmap *__regmap_init_spi_avmm(struct spi_device *spi,
681 bridge = spi_avmm_bridge_ctx_gen(spi);
685 map = __regmap_init(&spi->dev, ®map_spi_avmm_bus,
696 struct regmap *__devm_regmap_init_spi_avmm(struct spi_device *spi,
704 bridge = spi_avmm_bridge_ctx_gen(spi);
708 map = __devm_regmap_init(&spi->dev, ®map_spi_avmm_bus,