staging:iio:ade7758: 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:16 +0000 (18:18 +0100)
commitee0312a05ddceb0fc871f39b8f56b4cabc5176aa
treeecee0e100f006c8b8bb011e7beb90aa250f9180d
parent8c2c6ba6aa8f187b465fab13627566311a0c03fb
staging:iio:ade7758: Use iio_validate_scan_mask_onehot

Only one of the channels of the ade7758 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.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/meter/ade7758.h
drivers/staging/iio/meter/ade7758_core.c
drivers/staging/iio/meter/ade7758_ring.c