Skip to contentSkip to conversation

iio: adis16400 scan mask question

DISCUSSION Peter Meerwald 2 participants 3 messages Sep 17, 2013 – Sep 18, 2013 IIO

lore
Share & tools
lore
#0 lore raw

Hello,

why the following code in drivers/iio/imu/adis16400_core.c?

static const unsigned long adis16400_burst_scan_mask[] = {
	~0UL,
	0,
};

[...]

if (!(st->variant->flags & ADIS16400_NO_BURST))

		indio_dev->available_scan_masks = adis16400_burst_scan_mask;

isn't the all-1 scan mask the same as not applying any scan mask?

thanks, regards, p.

Signature · 2 lines
Peter Meerwald
+43-664-2444418 (mobile)
#1 lore raw
Quoted 9 lines · Peter Meerwald

Hello,

why the following code in drivers/iio/imu/adis16400_core.c?

static const unsigned long adis16400_burst_scan_mask[] = {
	~0UL,
	0,
};
Quoted 7 lines

[...]

if (!(st->variant->flags & ADIS16400_NO_BURST))

		indio_dev->available_scan_masks = adis16400_burst_scan_mask;

isn't the all-1 scan mask the same as not applying any scan mask?

A scan mask where all bits are set means that sampling can only be done with all channels enabled at once. Userspace can still only select a subset of these channels and the kernel will take care of properly demuxing the stream.

- Lars

#2 lore raw
Quoted 8 lines
Quoted 4 lines

if (!(st->variant->flags & ADIS16400_NO_BURST))

		indio_dev->available_scan_masks = adis16400_burst_scan_mask;

isn't the all-1 scan mask the same as not applying any scan mask?

A scan mask where all bits are set means that sampling can only be done with all channels enabled at once. Userspace can still only select a subset of these channels and the kernel will take care of properly demuxing the stream.

ah, that's a pretty good reason
I discovered the demuxing code later-on

thanks, p.

Signature · 2 lines
Peter Meerwald
+43-664-2444418 (mobile)