• Lars-Peter Clausen's avatar
    staging:iio:ad7192: Use iio_validate_scan_mask_onehot · f6aea554
    Lars-Peter Clausen authored
    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: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    f6aea554
ad7192.c 28.2 KB