staging:iio:adc:ad7280a: Make oversampling_ratio a runtime control
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Feb 2022 19:03:18 +0000 (19:03 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Feb 2022 19:33:04 +0000 (19:33 +0000)
commitc5fe2f537b91e17c854135fdc0b46aa0f4f9db78
tree5031fbc182ffe57f8cbb12dd35925776b01a9e6d
parente0a3ae8e42edd856f3119ac21dd9fb94000342c0
staging:iio:adc:ad7280a: Make oversampling_ratio a runtime control

Oversampling has nothing directly to do with analog circuits or
similar so belongs in the control of userspace as a policy decision.

The only complexity in here was that the acquisition time needs
updating if this setting is changed at runtime (as oversampling
is time consuming).

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220206190328.333093-11-jic23@kernel.org
drivers/staging/iio/adc/ad7280a.c
drivers/staging/iio/adc/ad7280a.h