]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7192: Use standard attribute
authorAlisa-Dariana Roman <alisadariana@gmail.com>
Tue, 14 May 2024 12:02:17 +0000 (15:02 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Jun 2024 18:53:05 +0000 (19:53 +0100)
commitf311151600dc104e6eeb0d0437582e0cf37d6962
treea069cf17ac6bdd3227435f842e33049e5918593e
parentd174ebd41280fdd3fd3b1d10c46b48d29a14c56f
iio: adc: ad7192: Use standard attribute

Replace custom attribute filter_low_pass_3db_frequency_available with
standard attribute.

Store the available values in ad7192_state struct.

The function that used to compute those values replaced by
ad7192_update_filter_freq_avail().

Function ad7192_show_filter_avail() is no longer needed.

Note that the initial available values are hardcoded.

Also moved the mutex lock and unlock in order to protect the whole
switch statement since each branch modifies the state of the device.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Link: https://lore.kernel.org/r/20240514120222.56488-2-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7192.c