@@ -173,6 +173,27 @@ struct iio_event_spec {
173
173
unsigned long mask_shared_by_all ;
174
174
};
175
175
176
+ /**
177
+ * struct iio_scan_type - specification for channel data format in buffer
178
+ * @sign: 's' or 'u' to specify signed or unsigned
179
+ * @realbits: Number of valid bits of data
180
+ * @storagebits: Realbits + padding
181
+ * @shift: Shift right by this before masking out realbits.
182
+ * @repeat: Number of times real/storage bits repeats. When the
183
+ * repeat element is more than 1, then the type element in
184
+ * sysfs will show a repeat value. Otherwise, the number
185
+ * of repetitions is omitted.
186
+ * @endianness: little or big endian
187
+ */
188
+ struct iio_scan_type {
189
+ char sign ;
190
+ u8 realbits ;
191
+ u8 storagebits ;
192
+ u8 shift ;
193
+ u8 repeat ;
194
+ enum iio_endian endianness ;
195
+ };
196
+
176
197
/**
177
198
* struct iio_chan_spec - specification of a single channel
178
199
* @type: What type of measurement is the channel making.
@@ -184,17 +205,6 @@ struct iio_event_spec {
184
205
* @scan_index: Monotonic index to give ordering in scans when read
185
206
* from a buffer.
186
207
* @scan_type: struct describing the scan type
187
- * @scan_type.sign: 's' or 'u' to specify signed or unsigned
188
- * @scan_type.realbits: Number of valid bits of data
189
- * @scan_type.storagebits: Realbits + padding
190
- * @scan_type.shift: Shift right by this before masking out
191
- * realbits.
192
- * @scan_type.repeat: Number of times real/storage bits repeats.
193
- * When the repeat element is more than 1, then
194
- * the type element in sysfs will show a repeat
195
- * value. Otherwise, the number of repetitions
196
- * is omitted.
197
- * @scan_type.endianness: little or big endian
198
208
* @info_mask_separate: What information is to be exported that is specific to
199
209
* this channel.
200
210
* @info_mask_separate_available: What availability information is to be
@@ -242,14 +252,7 @@ struct iio_chan_spec {
242
252
int channel2 ;
243
253
unsigned long address ;
244
254
int scan_index ;
245
- struct {
246
- char sign ;
247
- u8 realbits ;
248
- u8 storagebits ;
249
- u8 shift ;
250
- u8 repeat ;
251
- enum iio_endian endianness ;
252
- } scan_type ;
255
+ struct iio_scan_type scan_type ;
253
256
long info_mask_separate ;
254
257
long info_mask_separate_available ;
255
258
long info_mask_shared_by_type ;
0 commit comments