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