Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / staging / iio / frequency / dds.h
1 /*
2  * dds.h - sysfs attributes associated with DDS devices
3  *
4  * Copyright (c) 2010 Analog Devices Inc.
5  *
6  * Licensed under the GPL-2 or later.
7  */
8 #ifndef IIO_DDS_H_
9 #define IIO_DDS_H_
10
11 /**
12  * /sys/bus/iio/devices/.../out_altvoltageX_frequencyY
13  */
14
15 #define IIO_DEV_ATTR_FREQ(_channel, _num, _mode, _show, _store, _addr)  \
16         IIO_DEVICE_ATTR(out_altvoltage##_channel##_frequency##_num,     \
17                         _mode, _show, _store, _addr)
18
19 /**
20  * /sys/bus/iio/devices/.../out_altvoltageX_frequencyY_scale
21  */
22
23 #define IIO_CONST_ATTR_FREQ_SCALE(_channel, _string)                    \
24         IIO_CONST_ATTR(out_altvoltage##_channel##_frequency_scale, _string)
25
26 /**
27  * /sys/bus/iio/devices/.../out_altvoltageX_frequencysymbol
28  */
29
30 #define IIO_DEV_ATTR_FREQSYMBOL(_channel, _mode, _show, _store, _addr)  \
31         IIO_DEVICE_ATTR(out_altvoltage##_channel##_frequencysymbol,     \
32                         _mode, _show, _store, _addr)
33
34 /**
35  * /sys/bus/iio/devices/.../out_altvoltageX_phaseY
36  */
37
38 #define IIO_DEV_ATTR_PHASE(_channel, _num, _mode, _show, _store, _addr) \
39         IIO_DEVICE_ATTR(out_altvoltage##_channel##_phase##_num,         \
40                         _mode, _show, _store, _addr)
41
42 /**
43  * /sys/bus/iio/devices/.../out_altvoltageX_phaseY_scale
44  */
45
46 #define IIO_CONST_ATTR_PHASE_SCALE(_channel, _string)                   \
47         IIO_CONST_ATTR(out_altvoltage##_channel##_phase_scale, _string)
48
49 /**
50  * /sys/bus/iio/devices/.../out_altvoltageX_phasesymbol
51  */
52
53 #define IIO_DEV_ATTR_PHASESYMBOL(_channel, _mode, _show, _store, _addr) \
54         IIO_DEVICE_ATTR(out_altvoltage##_channel##_phasesymbol,         \
55                         _mode, _show, _store, _addr)
56
57 /**
58  * /sys/bus/iio/devices/.../out_altvoltageX_pincontrol_en
59  */
60
61 #define IIO_DEV_ATTR_PINCONTROL_EN(_channel, _mode, _show, _store, _addr)\
62         IIO_DEVICE_ATTR(out_altvoltage##_channel##_pincontrol_en,       \
63                         _mode, _show, _store, _addr)
64
65 /**
66  * /sys/bus/iio/devices/.../out_altvoltageX_pincontrol_frequency_en
67  */
68
69 #define IIO_DEV_ATTR_PINCONTROL_FREQ_EN(_channel, _mode, _show, _store, _addr)\
70         IIO_DEVICE_ATTR(out_altvoltage##_channel##_pincontrol_frequency_en,\
71                         _mode, _show, _store, _addr)
72
73 /**
74  * /sys/bus/iio/devices/.../out_altvoltageX_pincontrol_phase_en
75  */
76
77 #define IIO_DEV_ATTR_PINCONTROL_PHASE_EN(_channel, _mode, _show, _store, _addr)\
78         IIO_DEVICE_ATTR(out_altvoltage##_channel##_pincontrol_phase_en, \
79                         _mode, _show, _store, _addr)
80
81 /**
82  * /sys/bus/iio/devices/.../out_altvoltageX_out_enable
83  */
84
85 #define IIO_DEV_ATTR_OUT_ENABLE(_channel, _mode, _show, _store, _addr)  \
86         IIO_DEVICE_ATTR(out_altvoltage##_channel##_out_enable,          \
87                         _mode, _show, _store, _addr)
88
89 /**
90  * /sys/bus/iio/devices/.../out_altvoltageX_outY_enable
91  */
92
93 #define IIO_DEV_ATTR_OUTY_ENABLE(_channel, _output,                     \
94                         _mode, _show, _store, _addr)                    \
95         IIO_DEVICE_ATTR(out_altvoltage##_channel##_out##_output##_enable,\
96                         _mode, _show, _store, _addr)
97
98 /**
99  * /sys/bus/iio/devices/.../out_altvoltageX_outY_wavetype
100  */
101
102 #define IIO_DEV_ATTR_OUT_WAVETYPE(_channel, _output, _store, _addr)     \
103         IIO_DEVICE_ATTR(out_altvoltage##_channel##_out##_output##_wavetype,\
104                         S_IWUSR, NULL, _store, _addr)
105
106 /**
107  * /sys/bus/iio/devices/.../out_altvoltageX_outY_wavetype_available
108  */
109
110 #define IIO_CONST_ATTR_OUT_WAVETYPES_AVAILABLE(_channel, _output, _modes)\
111         IIO_CONST_ATTR(                                                 \
112         out_altvoltage##_channel##_out##_output##_wavetype_available, _modes)
113
114 #endif /* IIO_DDS_H_ */