]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging:iio:ad7192: Use iio_validate_scan_mask_onehot
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 9 Jul 2012 09:00:00 +0000 (10:00 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 9 Jul 2012 17:18:15 +0000 (18:18 +0100)
commitf6aea5543021c341f0397b191243fecca98ac595
tree591f18350925213257753cc490a7588fdc063fa8
parent81636632057cc1bece2531220dd5803036f95ea9
staging:iio:ad7192: Use iio_validate_scan_mask_onehot

Only one of the channels of the ad7192 may be sampled at a time. Use the new
validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
implement this restriction. Previously this was implemented using
available_scan_masks, but this requires a individual scan mask for each channel.

Also the previous code was adding the scan index of the timestamp channel to
each available scan mask, this is not required though since the timestamp
channel is not restricted by the available scan masks and can be enabled or
disabled independently. So the new code does not have to take care of this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7192.c