Lines Matching +full:data +full:- +full:mapping

1 /* SPDX-License-Identifier: GPL-2.0+ */
100 * enum spi_mem_data_dir - describes the direction of a SPI memory data
102 * @SPI_MEM_NO_DATA: no data transferred
103 * @SPI_MEM_DATA_IN: data coming from the SPI memory
104 * @SPI_MEM_DATA_OUT: data sent to the SPI memory
116 * struct spi_mem_op - describes a SPI memory operation
118 * sent MSB-first.
134 * @data.buswidth: number of IO lanes used to send/receive the data
135 * @data.dtr: whether the data should be sent in DTR mode or not
136 * @data.ecc: whether error correction is required or not
137 * @data.swap16: whether the byte order of 16-bit words is swapped when read
139 * @data.dir: direction of the transfer
140 * @data.nbytes: number of data bytes to send/receive. Can be zero if the
141 * operation does not involve transferring data
142 * @data.buf.in: input buffer (must be DMA-able)
143 * @data.buf.out: output buffer (must be DMA-able)
184 } data; member
194 .data = __data, \
199 * struct spi_mem_dirmap_info - Direct mapping information
200 * @op_tmpl: operation template that should be used by the direct mapping when
202 * @offset: absolute offset this direct mapping is pointing to
203 * @length: length in byte of this direct mapping
208 * A direct mapping is only valid for one direction (read or write) and this
209 * direction is directly encoded in the ->op_tmpl.data.dir field.
218 * struct spi_mem_dirmap_desc - Direct mapping descriptor
219 * @mem: the SPI memory device this direct mapping is attached to
220 * @info: information passed at direct mapping creation time
222 * ->mem_ops->dirmap_create() or when this function returned an
226 * no matter whether the controller supports direct mapping or not
227 * @priv: field pointing to controller specific data
229 * Common part of a direct mapping descriptor. This object is created by
230 * spi_mem_dirmap_create() and controller implementation of ->create_dirmap()
231 * can create/attach direct mapping resources to the descriptor in the ->priv
242 * struct spi_mem - describes a SPI memory device
244 * @drvpriv: spi_mem_driver private data
251 * mem devices through a io-mapped region.
260 * struct spi_mem_set_drvdata() - attach driver private data to a SPI mem
263 * @data: data to attach to the memory device
265 static inline void spi_mem_set_drvdata(struct spi_mem *mem, void *data) in spi_mem_set_drvdata() argument
267 mem->drvpriv = data; in spi_mem_set_drvdata()
271 * struct spi_mem_get_drvdata() - get driver private data attached to a SPI mem
275 * Return: the data attached to the mem device.
279 return mem->drvpriv; in spi_mem_get_drvdata()
283 * struct spi_controller_mem_ops - SPI memory operations
284 * @adjust_op_size: shrink the data xfer of an operation to match controller's
289 * not all driver provides supports_op(), so it can return -EOPNOTSUPP
297 * have a ->free_name() function.
298 * @dirmap_create: create a direct mapping descriptor that can later be used to
301 * ->dirmap_create()
302 * @dirmap_read: read data from the memory device using the direct mapping
303 * created by ->dirmap_create(). The function can return less
304 * data than requested (for example when the request is crossing
308 * @dirmap_write: write data to the memory device using the direct mapping
309 * created by ->dirmap_create(). The function can return less
310 * data than requested (for example when the request is crossing
315 * when the timeout has expired. It fills the data buffer with
319 * high-level interface to execute SPI memory operation, which is usually the
322 * Note on ->dirmap_{read,write}(): drivers should avoid accessing the direct
323 * mapping from the CPU because doing that can stall the CPU waiting for the
324 * SPI mem transaction to finish, and this will make real-time maintainers
326 * use DMA to access this direct mapping.
350 * struct spi_controller_mem_caps - SPI memory controller capabilities
365 ((ctlr)->mem_caps && (ctlr)->mem_caps->cap)
368 * struct spi_mem_driver - SPI memory driver
407 return -ENOTSUPP; in spi_controller_dma_map_mem_op_data()