spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / drivers / staging / iio / dds / dds.h
blobd8ac3a93baf6ac11c09167cc9681b8b59cffce31
1 /*
2 * dds.h - sysfs attributes associated with DDS devices
4 * Copyright (c) 2010 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
9 /**
10 * /sys/bus/iio/devices/.../ddsX_freqY
13 #define IIO_DEV_ATTR_FREQ(_channel, _num, _mode, _show, _store, _addr) \
14 IIO_DEVICE_ATTR(dds##_channel##_freq##_num, \
15 _mode, _show, _store, _addr)
17 /**
18 * /sys/bus/iio/devices/.../ddsX_freqY_scale
21 #define IIO_CONST_ATTR_FREQ_SCALE(_channel, _string) \
22 IIO_CONST_ATTR(dds##_channel##_freq_scale, _string)
24 /**
25 * /sys/bus/iio/devices/.../ddsX_freqsymbol
28 #define IIO_DEV_ATTR_FREQSYMBOL(_channel, _mode, _show, _store, _addr) \
29 IIO_DEVICE_ATTR(dds##_channel##_freqsymbol, \
30 _mode, _show, _store, _addr);
32 /**
33 * /sys/bus/iio/devices/.../ddsX_phaseY
36 #define IIO_DEV_ATTR_PHASE(_channel, _num, _mode, _show, _store, _addr) \
37 IIO_DEVICE_ATTR(dds##_channel##_phase##_num, \
38 _mode, _show, _store, _addr)
40 /**
41 * /sys/bus/iio/devices/.../ddsX_phaseY_scale
44 #define IIO_CONST_ATTR_PHASE_SCALE(_channel, _string) \
45 IIO_CONST_ATTR(dds##_channel##_phase_scale, _string)
47 /**
48 * /sys/bus/iio/devices/.../ddsX_phasesymbol
51 #define IIO_DEV_ATTR_PHASESYMBOL(_channel, _mode, _show, _store, _addr) \
52 IIO_DEVICE_ATTR(dds##_channel##_phasesymbol, \
53 _mode, _show, _store, _addr);
55 /**
56 * /sys/bus/iio/devices/.../ddsX_pincontrol_en
59 #define IIO_DEV_ATTR_PINCONTROL_EN(_channel, _mode, _show, _store, _addr)\
60 IIO_DEVICE_ATTR(dds##_channel##_pincontrol_en, \
61 _mode, _show, _store, _addr);
63 /**
64 * /sys/bus/iio/devices/.../ddsX_pincontrol_freq_en
67 #define IIO_DEV_ATTR_PINCONTROL_FREQ_EN(_channel, _mode, _show, _store, _addr)\
68 IIO_DEVICE_ATTR(dds##_channel##_pincontrol_freq_en, \
69 _mode, _show, _store, _addr);
71 /**
72 * /sys/bus/iio/devices/.../ddsX_pincontrol_phase_en
75 #define IIO_DEV_ATTR_PINCONTROL_PHASE_EN(_channel, _mode, _show, _store, _addr)\
76 IIO_DEVICE_ATTR(dds##_channel##_pincontrol_phase_en, \
77 _mode, _show, _store, _addr);
79 /**
80 * /sys/bus/iio/devices/.../ddsX_out_enable
83 #define IIO_DEV_ATTR_OUT_ENABLE(_channel, _mode, _show, _store, _addr) \
84 IIO_DEVICE_ATTR(dds##_channel##_out_enable, \
85 _mode, _show, _store, _addr);
87 /**
88 * /sys/bus/iio/devices/.../ddsX_outY_enable
91 #define IIO_DEV_ATTR_OUTY_ENABLE(_channel, _output, \
92 _mode, _show, _store, _addr) \
93 IIO_DEVICE_ATTR(dds##_channel##_out##_output##_enable, \
94 _mode, _show, _store, _addr);
96 /**
97 * /sys/bus/iio/devices/.../ddsX_outY_wavetype
100 #define IIO_DEV_ATTR_OUT_WAVETYPE(_channel, _output, _store, _addr) \
101 IIO_DEVICE_ATTR(dds##_channel##_out##_output##_wavetype, \
102 S_IWUSR, NULL, _store, _addr);
105 * /sys/bus/iio/devices/.../ddsX_outY_wavetype_available
108 #define IIO_CONST_ATTR_OUT_WAVETYPES_AVAILABLE(_channel, _output, _modes)\
109 IIO_CONST_ATTR(dds##_channel##_out##_output##_wavetype_available,\
110 _modes);