Lines Matching +full:maximum +full:- +full:speed

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
49 * @max_hz: Maximum speed that the bus can tolerate.
50 * @speed: Current bus speed. This is 0 until the bus is first claimed.
57 uint speed; member
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)
72 * @max_hz: Maximum bus speed that this slave can tolerate
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.
95 * @max_hz: Maximum speed for this slave
98 * bus (bus->seq) so does not need to be stored
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)
155 * spi_alloc_slave - Allocate a new SPI slave
170 * spi_alloc_slave_base - Allocate a new SPI slave with no private data
191 * @max_hz: Maximum SCK rate in Hz.
242 * Returns: 0 on success, -1 on failure.
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
324 * Set transfer speed.
325 * This sets a new speed to be applied for next spi_xfer().
327 * @hz: The transfer speed
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.
435 * Returns: 0 on success, not -1 on failure
441 * Optimized handlers for SPI memory-like operations.
450 * Set transfer speed.
451 * This sets a new speed to be applied for next spi_xfer().
453 * @hz: The transfer speed
454 * @return 0 if OK, -ve on error
461 * It is unclear if we want to set speed and mode together instead
466 * @return 0 if OK, -ve on error
478 * @cs: The chip select (0..n-1)
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
523 * Returns: 0 on success, not -1 on failure
530 * spi_find_bus_and_cs() - Find bus and slave devices by number
540 * @return 0 if found, -ENODEV on error
546 * spi_get_bus_and_cs() - Find and activate bus and slave devices by number
552 * is automatically bound on this chip select with requested speed and mode.
554 * Ths new slave device is probed ready for use with the speed and mode
559 * @speed: SPI speed to use for this slave when not available in platdata
565 * @return 0 if found, -ve on error
567 int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
572 * spi_chip_select() - Get the chip select for a slave
579 * spi_find_chip_select() - Find the slave attached to chip select
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
592 * This decodes the speed and mode for a slave from a device tree node
602 * spi_cs_info() - Check information on a chip select
608 * @cs: The chip select (0..n-1)
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
629 * @return 0 if OK, -ve on error
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)