]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7606: fix wrong scale available
authorAngelo Dureghello <adureghello@baylibre.com>
Wed, 29 Jan 2025 11:03:04 +0000 (12:03 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 3 Feb 2025 19:30:12 +0000 (19:30 +0000)
commitbead181694df16de464ca2392d0cec2cf15fb978
tree2fa9cb28dbb79d89741bd7f00d531c7f27b088a4
parent02ccd7e5d81af4ae20852fc1ad67e7d943fa5778
iio: adc: ad7606: fix wrong scale available

Fix wrong scale available list since only one value is returned:

...
iio:device1: ad7606b (buffer capable)
    8 channels found:
           voltage0:  (input, index: 0, format: le:S16/16>>0)
           2 channel-specific attributes found:
                 attr  0: scale value: 0.305176
                 attr  1: scale_available value: 0.076293
Fix as:
           voltage0:  (input, index: 0, format: le:S16/16>>0)
           2 channel-specific attributes found:
                 attr  0: scale value: 0.305176
                 attr  1: scale_available value: 0.076293 0.152588 0.305176

Fixes: 97c6d857041d ("iio: adc: ad7606: rework scale-available to be static")
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Link: https://patch.msgid.link/20250129-wip-bl-ad7606_add_backend_sw_mode-v3-3-c3aec77c0ab7@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7606.c