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 9 /** 10 * /sys/bus/iio/devices/.../ddsX_freqY 11 */ 12 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) 16 17 /** 18 * /sys/bus/iio/devices/.../ddsX_freqY_scale 19 */ 20 21 #define IIO_CONST_ATTR_FREQ_SCALE(_channel, _string) \ 22 IIO_CONST_ATTR(dds##_channel##_freq_scale, _string) 23 24 /** 25 * /sys/bus/iio/devices/.../ddsX_freqsymbol 26 */ 27 28 #define IIO_DEV_ATTR_FREQSYMBOL(_channel, _mode, _show, _store, _addr) \ 29 IIO_DEVICE_ATTR(dds##_channel##_freqsymbol, \ 30 _mode, _show, _store, _addr); 31 32 /** 33 * /sys/bus/iio/devices/.../ddsX_phaseY 34 */ 35 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) 39 40 /** 41 * /sys/bus/iio/devices/.../ddsX_phaseY_scale 42 */ 43 44 #define IIO_CONST_ATTR_PHASE_SCALE(_channel, _string) \ 45 IIO_CONST_ATTR(dds##_channel##_phase_scale, _string) 46 47 /** 48 * /sys/bus/iio/devices/.../ddsX_phasesymbol 49 */ 50 51 #define IIO_DEV_ATTR_PHASESYMBOL(_channel, _mode, _show, _store, _addr) \ 52 IIO_DEVICE_ATTR(dds##_channel##_phasesymbol, \ 53 _mode, _show, _store, _addr); 54 55 /** 56 * /sys/bus/iio/devices/.../ddsX_pincontrol_en 57 */ 58 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); 62 63 /** 64 * /sys/bus/iio/devices/.../ddsX_pincontrol_freq_en 65 */ 66 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); 70 71 /** 72 * /sys/bus/iio/devices/.../ddsX_pincontrol_phase_en 73 */ 74 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); 78 79 /** 80 * /sys/bus/iio/devices/.../ddsX_out_enable 81 */ 82 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); 86 87 /** 88 * /sys/bus/iio/devices/.../ddsX_outY_enable 89 */ 90 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); 95 96 /** 97 * /sys/bus/iio/devices/.../ddsX_outY_wavetype 98 */ 99 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); 103 104 /** 105 * /sys/bus/iio/devices/.../ddsX_outY_wavetype_available 106 */ 107 108 #define IIO_CONST_ATTR_OUT_WAVETYPES_AVAILABLE(_channel, _output, _modes)\ 109 IIO_CONST_ATTR(dds##_channel##_out##_output##_wavetype_available,\ 110 _modes); 111