Merge remote-tracking branch 'asoc/topic/max98095' into asoc-next
[cascardo/linux.git] / drivers / staging / comedi / drivers / ni_labpc_isadma.h
1 /*
2  * ni_labpc ISA DMA support.
3 */
4
5 #ifndef _NI_LABPC_ISADMA_H
6 #define _NI_LABPC_ISADMA_H
7
8 #define NI_LABPC_HAVE_ISA_DMA   IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISADMA)
9
10 #if NI_LABPC_HAVE_ISA_DMA
11
12 static inline bool labpc_have_dma_chan(struct comedi_device *dev)
13 {
14         struct labpc_private *devpriv = dev->private;
15
16         return (bool)devpriv->dma_chan;
17 }
18
19 int labpc_init_dma_chan(struct comedi_device *dev, unsigned int dma_chan);
20 void labpc_free_dma_chan(struct comedi_device *dev);
21 void labpc_setup_dma(struct comedi_device *dev, struct comedi_subdevice *s);
22 void labpc_drain_dma(struct comedi_device *dev);
23 void labpc_handle_dma_status(struct comedi_device *dev);
24
25 #else
26
27 static inline bool labpc_have_dma_chan(struct comedi_device *dev)
28 {
29         return false;
30 }
31
32 static inline int labpc_init_dma_chan(struct comedi_device *dev,
33                                       unsigned int dma_chan)
34 {
35         return -ENOTSUPP;
36 }
37
38 static inline void labpc_free_dma_chan(struct comedi_device *dev)
39 {
40 }
41
42 static inline void labpc_setup_dma(struct comedi_device *dev,
43                                    struct comedi_subdevice *s)
44 {
45 }
46
47 static inline void labpc_drain_dma(struct comedi_device *dev)
48 {
49 }
50
51 static inline void labpc_handle_dma_status(struct comedi_device *dev)
52 {
53 }
54
55 #endif
56
57 #endif /* _NI_LABPC_ISADMA_H */