xref: /linux/include/linux/dma-direction.h (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_DMA_DIRECTION_H
3 #define _LINUX_DMA_DIRECTION_H
4 
5 enum dma_data_direction {
6 	DMA_BIDIRECTIONAL = 0,
7 	DMA_TO_DEVICE = 1,
8 	DMA_FROM_DEVICE = 2,
9 	DMA_NONE = 3,
10 };
11 
12 static inline int valid_dma_direction(enum dma_data_direction dir)
13 {
14 	return dir == DMA_BIDIRECTIONAL || dir == DMA_TO_DEVICE ||
15 		dir == DMA_FROM_DEVICE;
16 }
17 
18 #endif /* _LINUX_DMA_DIRECTION_H */
19