Lines Matching +full:two +full:- +full:wires

1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Common SPI Interface: Controller-specific definitions
22 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */
28 #define SPI_TX_DUAL BIT(9) /* transmit with 2 wires */
29 #define SPI_TX_QUAD BIT(10) /* transmit with 4 wires */
31 #define SPI_RX_DUAL BIT(12) /* receive with 2 wires */
32 #define SPI_RX_QUAD BIT(13) /* receive with 4 wires */
46 * struct dm_spi_platdata - platform data for all SPI slaves
50 * dev_get_parent_platdata(slave->dev).
55 * @cs: Chip select number (0..n-1)
68 * struct spi_slave - Representation of a SPI slave
70 * For driver model this is the per-child data used by the SPI bus. It can
73 * driver should not override it. Two platform data fields (max_hz and mode)
78 * controller-specific data.
86 * bus (bus->seq) so does not need to be stored
90 * @max_read_size: If non-zero, the maximum number of bytes which can
92 * @max_write_size: If non-zero, the maximum number of bytes which can
94 * @memory_map: Address of read-only SPI flash access.
99 struct udevice *dev; /* struct spi_slave is dev->parentdata */
121 * spi_do_alloc_slave - Allocate a new SPI slave (internal)
135 * spi_alloc_slave - Allocate a new SPI slave
150 * spi_alloc_slave_base - Allocate a new SPI slave with no private data
222 * Returns: 0 on success, -1 on failure.
256 * This function is provided by the board if the low-level SPI driver
317 * struct spi_cs_info - Information about a bus chip select
326 * struct struct dm_spi_ops - Driver model SPI operations
370 * Returns: 0 on success, -ve on failure.
395 * Returns: 0 on success, not -1 on failure
401 * Optimized handlers for SPI memory-like operations.
414 * @return 0 if OK, -ve on error
426 * @return 0 if OK, -ve on error
438 * @cs: The chip select (0..n-1)
440 * On entry info->dev is NULL
441 * @return 0 if OK (and @info is set up), -ENODEV if the chip select
442 * is invalid, other -ve value on error
473 * Returns: 0 on success, not -1 on failure
480 * spi_find_bus_and_cs() - Find bus and slave devices by number
490 * @return 0 if found, -ENODEV on error
496 * spi_get_bus_and_cs() - Find and activate bus and slave devices by number
514 * @return 0 if found, -ve on error
521 * spi_chip_select() - Get the chip select for a slave
528 * spi_find_chip_select() - Find the slave attached to chip select
533 * @return 0 if found, -ENODEV on error
538 * spi_slave_ofdata_to_platdata() - decode standard SPI platform data
550 * spi_cs_info() - Check information on a chip select
556 * @cs: The chip select (0..n-1)
558 * @return 0 if OK (and @info is set up), -ENODEV if the chip select
559 * is invalid, other -ve value on error
566 * sandbox_spi_get_emul() - get an emulator for a SPI slave
577 * @return 0 if OK, -ve on error
636 #define spi_get_ops(dev) ((struct dm_spi_ops *)(dev)->driver->ops)
637 #define spi_emul_get_ops(dev) ((struct dm_spi_emul_ops *)(dev)->driver->ops)