Lines Matching +full:data +full:- +full:mapping
1 /* SPDX-License-Identifier: GPL-2.0+ */
59 * enum spi_mem_data_dir - describes the direction of a SPI memory data
61 * @SPI_MEM_NO_DATA: no data transferred
62 * @SPI_MEM_DATA_IN: data coming from the SPI memory
63 * @SPI_MEM_DATA_OUT: data sent to the SPI memory
72 * struct spi_mem_op - describes a SPI memory operation
74 * sent MSB-first.
90 * @data.buswidth: number of IO lanes used to send/receive the data
91 * @data.dtr: whether the data should be sent in DTR mode or not
92 * @data.dir: direction of the transfer
93 * @data.nbytes: number of data bytes to send/receive. Can be zero if the
94 * operation does not involve transferring data
95 * @data.buf.in: input buffer (must be DMA-able)
96 * @data.buf.out: output buffer (must be DMA-able)
128 } data; member
136 .data = __data, \
140 * struct spi_mem_dirmap_info - Direct mapping information
141 * @op_tmpl: operation template that should be used by the direct mapping when
143 * @offset: absolute offset this direct mapping is pointing to
144 * @length: length in byte of this direct mapping
149 * A direct mapping is only valid for one direction (read or write) and this
150 * direction is directly encoded in the ->op_tmpl.data.dir field.
159 * struct spi_mem_dirmap_desc - Direct mapping descriptor
160 * @mem: the SPI memory device this direct mapping is attached to
161 * @info: information passed at direct mapping creation time
163 * ->mem_ops->dirmap_create() or when this function returned an
167 * no matter whether the controller supports direct mapping or not
168 * @priv: field pointing to controller specific data
170 * Common part of a direct mapping descriptor. This object is created by
171 * spi_mem_dirmap_create() and controller implementation of ->create_dirmap()
172 * can create/attach direct mapping resources to the descriptor in the ->priv
183 * struct spi_mem - describes a SPI memory device
185 * @drvpriv: spi_mem_driver private data
192 * mem devices through a io-mapped region.
201 * struct spi_mem_set_drvdata() - attach driver private data to a SPI mem
204 * @data: data to attach to the memory device
206 static inline void spi_mem_set_drvdata(struct spi_mem *mem, void *data) in spi_mem_set_drvdata() argument
208 mem->drvpriv = data; in spi_mem_set_drvdata()
212 * struct spi_mem_get_drvdata() - get driver private data attached to a SPI mem
216 * Return: the data attached to the mem device.
220 return mem->drvpriv; in spi_mem_get_drvdata()
224 * struct spi_controller_mem_ops - SPI memory operations
225 * @adjust_op_size: shrink the data xfer of an operation to match controller's
236 * have a ->free_name() function.
237 * @dirmap_create: create a direct mapping descriptor that can later be used to
240 * ->dirmap_create()
241 * @dirmap_read: read data from the memory device using the direct mapping
242 * created by ->dirmap_create(). The function can return less
243 * data than requested (for example when the request is crossing
247 * @dirmap_write: write data to the memory device using the direct mapping
248 * created by ->dirmap_create(). The function can return less
249 * data than requested (for example when the request is crossing
255 * high-level interface to execute SPI memory operation, which is usually the
258 * Note on ->dirmap_{read,write}(): drivers should avoid accessing the direct
259 * mapping from the CPU because doing that can stall the CPU waiting for the
260 * SPI mem transaction to finish, and this will make real-time maintainers
262 * use DMA to access this direct mapping.
280 * struct spi_mem_driver - SPI memory driver
320 return -ENOTSUPP; in spi_controller_dma_map_mem_op_data()