Lines Matching +full:memory +full:- +full:controller

1 /* SPDX-License-Identifier: GPL-2.0+ */
100 * enum spi_mem_data_dir - describes the direction of a SPI memory data
101 * transfer from the controller perspective
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.
137 * @data.swap16: whether the byte order of 16-bit words is swapped when read
142 * @data.buf.in: input buffer (must be DMA-able)
143 * @data.buf.out: output buffer (must be DMA-able)
199 * struct spi_mem_dirmap_info - Direct mapping information
201 * the memory device is accessed
205 * These information are used by the controller specific implementation to know
206 * the portion of memory that is directly mapped and the spi_mem_op that should
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
221 * @nodirmap: set to 1 if the SPI controller does not implement
222 * ->mem_ops->dirmap_create() or when this function returned an
224 * calls will use spi_mem_exec_op() to access the memory. This is a
226 * no matter whether the controller supports direct mapping or not
227 * @priv: field pointing to controller specific data
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
245 * @name: name of the SPI memory device
247 * Extra information that describe the SPI memory device and may be needed by
248 * the controller to properly handle this device should be placed here.
250 * One example would be the device size since some controller expose their SPI
251 * mem devices through a io-mapped region.
260 * struct spi_mem_set_drvdata() - attach driver private data to a SPI mem
262 * @mem: memory device
263 * @data: data to attach to the memory device
267 mem->drvpriv = data; in spi_mem_set_drvdata()
271 * struct spi_mem_get_drvdata() - get driver private data attached to a SPI mem
273 * @mem: memory 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
287 * @supports_op: check if an operation is supported by the controller
288 * @exec_op: execute a SPI memory operation
289 * not all driver provides supports_op(), so it can return -EOPNOTSUPP
290 * if the op is not supported by the driver/controller
291 * @get_name: get a custom name for the SPI mem device from the controller.
292 * This might be needed if the controller driver has been ported
295 * Note that if the implementation of this function allocates memory
297 * have a ->free_name() function.
299 * access the memory device. This method is optional
300 * @dirmap_destroy: destroy a memory descriptor previous created by
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
308 * @dirmap_write: write data to the memory device using the direct mapping
309 * created by ->dirmap_create(). The function can return less
314 * @poll_status: poll memory device status until (status & mask) == match or
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
324 * SPI mem transaction to finish, and this will make real-time maintainers
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
370 * @probe: probe a SPI memory. Usually where detection/initialization takes
372 * @remove: remove a SPI memory
379 * SPI controllers know more about the SPI memory they interact with, and
407 return -ENOTSUPP; in spi_controller_dma_map_mem_op_data()