iio: adc: ad7793: use read_avail iio hook for scale available
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Sun, 22 Mar 2020 15:26:56 +0000 (17:26 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Apr 2020 15:56:15 +0000 (16:56 +0100)
commit1cfe38fc40e6d3d86e8fc88f9e2c080b9b38df3d
tree5d31936be37ab256206fa3ea0657e37ba9faa5cc
parentb7329249ea5b08b2a1c2c3f24a2f4c495c4f14b8
iio: adc: ad7793: use read_avail iio hook for scale available

This change uses the read_avail and '.info_mask_shared_by_type_available'
modifier to set the available scale.
Essentially, nothing changes to the driver's ABI.

The main idea for this patch is to remove the AD7793 driver from
checkpatch's radar. There have been about ~3 attempts to fix/break the
'in_voltage-voltage_scale_available' attribute, because checkpatch assumed
it to be an arithmetic operation and people were trying to change that.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7793.c