| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* |
| 3 | * Copyright (C) 2024 Analog Devices Inc. |
| 4 | * Copyright (C) 2024 BayLibre, SAS |
| 5 | */ |
| 6 | |
| 7 | #ifndef __LINUX_SPI_OFFLOAD_CONSUMER_H |
| 8 | #define __LINUX_SPI_OFFLOAD_CONSUMER_H |
| 9 | |
| 10 | #include <linux/module.h> |
| 11 | #include <linux/spi/offload/types.h> |
| 12 | #include <linux/types.h> |
| 13 | |
| 14 | MODULE_IMPORT_NS("SPI_OFFLOAD" ); |
| 15 | |
| 16 | struct device; |
| 17 | struct spi_device; |
| 18 | |
| 19 | struct spi_offload *devm_spi_offload_get(struct device *dev, struct spi_device *spi, |
| 20 | const struct spi_offload_config *config); |
| 21 | |
| 22 | struct spi_offload_trigger |
| 23 | *devm_spi_offload_trigger_get(struct device *dev, |
| 24 | struct spi_offload *offload, |
| 25 | enum spi_offload_trigger_type type); |
| 26 | int spi_offload_trigger_validate(struct spi_offload_trigger *trigger, |
| 27 | struct spi_offload_trigger_config *config); |
| 28 | int spi_offload_trigger_enable(struct spi_offload *offload, |
| 29 | struct spi_offload_trigger *trigger, |
| 30 | struct spi_offload_trigger_config *config); |
| 31 | void spi_offload_trigger_disable(struct spi_offload *offload, |
| 32 | struct spi_offload_trigger *trigger); |
| 33 | |
| 34 | struct dma_chan *devm_spi_offload_tx_stream_request_dma_chan(struct device *dev, |
| 35 | struct spi_offload *offload); |
| 36 | struct dma_chan *devm_spi_offload_rx_stream_request_dma_chan(struct device *dev, |
| 37 | struct spi_offload *offload); |
| 38 | |
| 39 | #endif /* __LINUX_SPI_OFFLOAD_CONSUMER_H */ |
| 40 | |