File Index
Files and directories
Sign in
FILE

dds.h

File preview with syntax highlighting.

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