This source file includes following definitions.
- spi_map_buf
- spi_unmap_buf
1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __LINUX_SPI_INTERNALS_H
13 #define __LINUX_SPI_INTERNALS_H
14
15 #include <linux/device.h>
16 #include <linux/dma-direction.h>
17 #include <linux/scatterlist.h>
18 #include <linux/spi/spi.h>
19
20 void spi_flush_queue(struct spi_controller *ctrl);
21
22 #ifdef CONFIG_HAS_DMA
23 int spi_map_buf(struct spi_controller *ctlr, struct device *dev,
24 struct sg_table *sgt, void *buf, size_t len,
25 enum dma_data_direction dir);
26 void spi_unmap_buf(struct spi_controller *ctlr, struct device *dev,
27 struct sg_table *sgt, enum dma_data_direction dir);
28 #else
29 static inline int spi_map_buf(struct spi_controller *ctlr, struct device *dev,
30 struct sg_table *sgt, void *buf, size_t len,
31 enum dma_data_direction dir)
32 {
33 return -EINVAL;
34 }
35
36 static inline void spi_unmap_buf(struct spi_controller *ctlr,
37 struct device *dev, struct sg_table *sgt,
38 enum dma_data_direction dir)
39 {
40 }
41 #endif
42
43 #endif