iio: adc: ad7192: Improve f_order computation
authorAlisa-Dariana Roman <alisa.roman@analog.com>
Sun, 24 Sep 2023 21:51:47 +0000 (00:51 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 5 Oct 2023 13:44:06 +0000 (14:44 +0100)
commite49075c7e9420b11b8e1aa8434e8790282df4a39
tree250145aa000335e62516a40ff4c70f8460faa890
parent874bbd1219c70b0d14881214c9768a0e4598fad5
iio: adc: ad7192: Improve f_order computation

Instead of using the f_order member of ad7192_state, a function that
computes the f_order coefficient makes more sense. This coefficient is a
function of the sinc filter and chop filter states.

Remove f_order member of ad7192_state structure. Instead use
ad7192_compute_f_order function to compute the f_order coefficient
according to the sinc filter and chop filter states passed as
parameters.

Add ad7192_get_f_order function that returns the current f_order
coefficient of the device.

Add ad7192_compute_f_adc function that computes the f_adc value
according to the sinc filter and chop filter states passed as
parameters.

Add ad7192_get_f_adc function that returns the current f_adc value of
the device.

Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Link: https://lore.kernel.org/r/20230924215148.102491-3-alisadariana@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7192.c