diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-07-09 10:00:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-07-09 18:18:15 +0100 |
commit | 939546d1a9f47ed169554c711e1e05965b84ffe1 (patch) | |
tree | 80ee898547145c1b202a77d3ca5f642809ba9778 /Documentation/braille-console.txt | |
parent | c732a24c5a9392cf3738f5957e0d97d37c09e6e1 (diff) |
iio: Add callback to check whether a scan mask is valid
This is useful for cases where the number of valid scan masks grows
exponentially, but it is rather easy to check whether a mask is valid or not
programmatically.
An example of such a case is a device with multiple ADCs where each ADC has a
upstream MUX, which allows to select from a number of physical channels.
+-------+ +-------+
| | | | --- Channel 1
| ADC 1 |---| MUX 1 | --- ...
| | | | --- Channel M
+-------+ +-------+
. . .
. . .
. . .
+-------+ +-------+
| | | | --- Channel M * N + 1
| ADC N |---| MUX N | --- ...
| | | | --- Channel M * N + M
+-------+ +-------+
The number of necessary scan masks for this case is (M+1)**N - 1, on the other
hand it is easy to check whether subsets for each ADC of the scanmask have only
one bit set.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'Documentation/braille-console.txt')
0 files changed, 0 insertions, 0 deletions