]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad9467: don't allow reading vref if not available
authorNuno Sa <nuno.sa@analog.com>
Thu, 4 Jul 2024 09:25:23 +0000 (11:25 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Jul 2024 19:31:11 +0000 (20:31 +0100)
commitb92f94f7482697e94f06ec483b7b4cfcc41e7497
treeee231684fe817be94dc9af1e3168e4904ad02551
parentbdc87f98cab780a6edfa658f20d9f95ad7e7efea
iio: adc: ad9467: don't allow reading vref if not available

If there's only one possible scale, there's no way to change the Vref
select in the device so avoid reading the register in ad9467_get_scale().
In this case, it makes no sense to provide the .read_available()
callback nor allowing for writing the scale attribute.

Note this is in preparation for supporting a new device that only has
one possible scale.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240704-dev-iio-ad9467-new-devs-v1-3-f1adfee921f7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad9467.c