Lines Matching +full:spi +full:- +full:slave
1 /* SPDX-License-Identifier: GPL-2.0+ */
17 #include <spi.h>
61 * enum spi_mem_data_dir - describes the direction of a SPI memory data
63 * @SPI_MEM_DATA_IN: data coming from the SPI memory
64 * @SPI_MEM_DATA_OUT: data sent the SPI memory
72 * struct spi_mem_op - describes a SPI memory operation
111 /* buf.{in,out} must be DMA-able. */
129 * struct spi_mem - describes a SPI memory device
130 * @spi: the underlying SPI device
133 * Extra information that describe the SPI memory device and may be needed by
136 * One example would be the device size since some controller expose their SPI
137 * mem devices through a io-mapped region.
145 * struct spi_mem_set_drvdata() - attach driver private data to a SPI mem
152 mem->drvpriv = data; in spi_mem_set_drvdata()
156 * struct spi_mem_get_drvdata() - get driver private data attached to a SPI mem
164 return mem->drvpriv; in spi_mem_get_drvdata()
169 * struct spi_controller_mem_ops - SPI memory operations
174 * @exec_op: execute a SPI memory operation
176 * This interface should be implemented by SPI controllers providing an
177 * high-level interface to execute SPI memory operation, which is usually the
181 int (*adjust_op_size)(struct spi_slave *slave, struct spi_mem_op *op);
182 bool (*supports_op)(struct spi_slave *slave,
184 int (*exec_op)(struct spi_slave *slave,
190 * struct spi_mem_driver - SPI memory driver
191 * @spidrv: inherit from a SPI driver
192 * @probe: probe a SPI memory. Usually where detection/initialization takes
194 * @remove: remove a SPI memory
201 * SPI controllers know more about the SPI memory they interact with, and
226 return -ENOTSUPP; in spi_controller_dma_map_mem_op_data()
238 int spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op);
240 bool spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op);
242 int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op);