Lines Matching +full:way +full:- +full:select

2  * Common SPI Interface: Controller-specific definitions
7 * SPDX-License-Identifier: GPL-2.0+
23 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */
44 * struct dm_spi_bus - SPI bus info
62 * struct dm_spi_platdata - platform data for all SPI slaves
66 * dev_get_parent_platdata(slave->dev).
71 * @cs: Chip select number (0..n-1)
82 * struct spi_slave - Representation of a SPI slave
84 * For driver model this is the per-child data used by the SPI bus. It can
92 * controller-specific data.
98 * bus (bus->seq) so does not need to be stored
99 * @cs: ID of the chip select connected to the slave.
102 * @max_read_size: If non-zero, the maximum number of bytes which can
104 * @max_write_size: If non-zero, the maximum number of bytes which can
106 * @memory_map: Address of read-only SPI flash access.
111 struct udevice *dev; /* struct spi_slave is dev->parentdata */
141 * spi_do_alloc_slave - Allocate a new SPI slave (internal)
144 * select. Use the helper macro spi_alloc_slave() to call this.
149 * @cs: Chip select ID of the slave chip on the specified bus.
155 * spi_alloc_slave - Allocate a new SPI slave
158 * select.
163 * @cs: Chip select ID of the slave chip on the specified bus.
170 * spi_alloc_slave_base - Allocate a new SPI slave with no private data
173 * select.
176 * @cs: Chip select ID of the slave chip on the specified bus.
190 * @cs: Chip select ID of the slave chip on the specified bus.
242 * Returns: 0 on success, -1 on failure.
250 * "bitlen" bits in the SPI MISO port. That's just the way SPI works.
272 * spi_write_then_read - SPI synchronous write followed by read
275 * is to send the opcode and if the length of buf is non-zero then it start
296 * This function is provided by the board if the low-level SPI driver
309 * common/soft_spi.c). When called, it should activate the chip select
319 * select to the device identified by "slave".
357 * struct spi_cs_info - Information about a bus chip select
366 * struct struct dm_spi_ops - Driver model SPI operations
410 * Returns: 0 on success, -ve on failure.
418 * clocks "bitlen" bits in the SPI MISO port. That's just the way SPI
435 * Returns: 0 on success, not -1 on failure
441 * Optimized handlers for SPI memory-like operations.
454 * @return 0 if OK, -ve on error
466 * @return 0 if OK, -ve on error
471 * Get information on a chip select
474 * chip select, i.e. it has no attached device. It gives the driver
475 * a chance to allow activity on that chip select even so.
478 * @cs: The chip select (0..n-1)
479 * @info: Returns information about the chip select, if valid.
480 * On entry info->dev is NULL
481 * @return 0 if OK (and @info is set up), -ENODEV if the chip select
482 * is invalid, other -ve value on error
487 * get_mmap() - Get memory-mapped SPI
494 * @return 0 if OK, -EFAULT if memory mapping is not available
505 * clocks "bitlen" bits in the SPI MISO port. That's just the way SPI
523 * Returns: 0 on success, not -1 on failure
530 * spi_find_bus_and_cs() - Find bus and slave devices by number
532 * Given a bus number and chip select, this finds the corresponding bus
537 * @cs: Chip select to look for
540 * @return 0 if found, -ENODEV on error
546 * spi_get_bus_and_cs() - Find and activate bus and slave devices by number
548 * Given a bus number and chip select, this finds the corresponding bus
552 * is automatically bound on this chip select with requested speed and mode.
558 * @cs: Chip select to look for
561 * @drv_name: Name of driver to attach to this chip select
565 * @return 0 if found, -ve on error
572 * spi_chip_select() - Get the chip select for a slave
574 * @return the chip select this slave is attached to
579 * spi_find_chip_select() - Find the slave attached to chip select
582 * @cs: Chip select to look for
584 * @return 0 if found, -EINVAL if cs is invalid, -ENODEV if no device attached,
585 * other -ve value on error
590 * spi_slave_ofdata_to_platdata() - decode standard SPI platform data
602 * spi_cs_info() - Check information on a chip select
604 * This checks a particular chip select on a bus to see if it has a device
608 * @cs: The chip select (0..n-1)
609 * @info: Returns information about the chip select, if valid
610 * @return 0 if OK (and @info is set up), -ENODEV if the chip select
611 * is invalid, other -ve value on error
618 * sandbox_spi_get_emul() - get an emulator for a SPI slave
620 * This provides a way to attach an emulated SPI device to a particular SPI
622 * emulator. If a emulator already exists on that chip select it is returned.
629 * @return 0 if OK, -ve on error
666 * "bitlen" bits in the SPI MISO port. That's just the way SPI works.
688 * spi_get_mmap() - Get memory-mapped SPI
695 * @return 0 if OK, -ENOSYS if no operation, -EFAULT if memory mapping is not
702 #define spi_get_ops(dev) ((struct dm_spi_ops *)(dev)->driver->ops)
703 #define spi_emul_get_ops(dev) ((struct dm_spi_emul_ops *)(dev)->driver->ops)