aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio/buffer.h')
-rw-r--r--include/linux/iio/buffer.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index fb0fe46fd659..8ba516fc2ec6 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -85,7 +85,7 @@ struct iio_buffer {
85 85
86/** 86/**
87 * iio_buffer_init() - Initialize the buffer structure 87 * iio_buffer_init() - Initialize the buffer structure
88 * @buffer: buffer to be initialized 88 * @buffer: buffer to be initialized
89 **/ 89 **/
90void iio_buffer_init(struct iio_buffer *buffer); 90void iio_buffer_init(struct iio_buffer *buffer);
91 91
@@ -107,8 +107,9 @@ int iio_scan_mask_query(struct iio_dev *indio_dev,
107 107
108/** 108/**
109 * iio_scan_mask_set() - set particular bit in the scan mask 109 * iio_scan_mask_set() - set particular bit in the scan mask
110 * @buffer: the buffer whose scan mask we are interested in 110 * @indio_dev IIO device structure
111 * @bit: the bit to be set. 111 * @buffer: the buffer whose scan mask we are interested in
112 * @bit: the bit to be set.
112 **/ 113 **/
113int iio_scan_mask_set(struct iio_dev *indio_dev, 114int iio_scan_mask_set(struct iio_dev *indio_dev,
114 struct iio_buffer *buffer, int bit); 115 struct iio_buffer *buffer, int bit);
@@ -116,8 +117,8 @@ int iio_scan_mask_set(struct iio_dev *indio_dev,
116/** 117/**
117 * iio_push_to_buffer() - push to a registered buffer. 118 * iio_push_to_buffer() - push to a registered buffer.
118 * @buffer: IIO buffer structure for device 119 * @buffer: IIO buffer structure for device
119 * @scan: Full scan. 120 * @data: the data to push to the buffer
120 * @timestamp: 121 * @timestamp: timestamp to associate with the data
121 */ 122 */
122int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data, 123int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
123 s64 timestamp); 124 s64 timestamp);
@@ -126,7 +127,9 @@ int iio_update_demux(struct iio_dev *indio_dev);
126 127
127/** 128/**
128 * iio_buffer_register() - register the buffer with IIO core 129 * iio_buffer_register() - register the buffer with IIO core
129 * @indio_dev: device with the buffer to be registered 130 * @indio_dev: device with the buffer to be registered
131 * @channels: the channel descriptions used to construct buffer
132 * @num_channels: the number of channels
130 **/ 133 **/
131int iio_buffer_register(struct iio_dev *indio_dev, 134int iio_buffer_register(struct iio_dev *indio_dev,
132 const struct iio_chan_spec *channels, 135 const struct iio_chan_spec *channels,
@@ -134,7 +137,7 @@ int iio_buffer_register(struct iio_dev *indio_dev,
134 137
135/** 138/**
136 * iio_buffer_unregister() - unregister the buffer from IIO core 139 * iio_buffer_unregister() - unregister the buffer from IIO core
137 * @indio_dev: the device with the buffer to be unregistered 140 * @indio_dev: the device with the buffer to be unregistered
138 **/ 141 **/
139void iio_buffer_unregister(struct iio_dev *indio_dev); 142void iio_buffer_unregister(struct iio_dev *indio_dev);
140 143
@@ -174,6 +177,9 @@ ssize_t iio_buffer_show_enable(struct device *dev,
174 177
175int iio_sw_buffer_preenable(struct iio_dev *indio_dev); 178int iio_sw_buffer_preenable(struct iio_dev *indio_dev);
176 179
180bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev,
181 const unsigned long *mask);
182
177#else /* CONFIG_IIO_BUFFER */ 183#else /* CONFIG_IIO_BUFFER */
178 184
179static inline int iio_buffer_register(struct iio_dev *indio_dev, 185static inline int iio_buffer_register(struct iio_dev *indio_dev,
@@ -184,7 +190,7 @@ static inline int iio_buffer_register(struct iio_dev *indio_dev,
184} 190}
185 191
186static inline void iio_buffer_unregister(struct iio_dev *indio_dev) 192static inline void iio_buffer_unregister(struct iio_dev *indio_dev)
187{}; 193{}
188 194
189#endif /* CONFIG_IIO_BUFFER */ 195#endif /* CONFIG_IIO_BUFFER */
190 196