kernel_samsung_a53x/drivers/iio/adc
Nuno Sa 7f83e105bd iio: adc: ad9467: fix scale setting
[ Upstream commit b73f08bb7fe5a0901646ca5ceaa1e7a2d5ee6293 ]

When reading in_voltage_scale we can get something like:

root@analog:/sys/bus/iio/devices/iio:device2# cat in_voltage_scale
0.038146

However, when reading the available options:

root@analog:/sys/bus/iio/devices/iio:device2# cat
in_voltage_scale_available
2000.000000 2100.000006 2200.000007 2300.000008 2400.000009 2500.000010

which does not make sense. Moreover, when trying to set a new scale we
get an error because there's no call to __ad9467_get_scale() to give us
values as given when reading in_voltage_scale. Fix it by computing the
available scales during probe and properly pass the list when
.read_available() is called.

While at it, change to use .read_available() from iio_info. Also note
that to properly fix this, adi-axi-adc.c has to be changed accordingly.

Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-4-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:49 +01:00
..
ab8500-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad799x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7091r-base.c iio: adc: ad7091r: Pass iio_dev to event handler 2024-11-18 12:12:48 +01:00
ad7091r-base.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7091r5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7124.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7192.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7266.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7291.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7292.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7298.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7476.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606_par.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7766.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7768-1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7780.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7791.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7793.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7887.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7923.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7949.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad9467.c iio: adc: ad9467: fix scale setting 2024-11-18 12:12:49 +01:00
ad_sigma_delta.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adi-axi-adc.c iio: adc: ad9467: fix scale setting 2024-11-18 12:12:49 +01:00
aspeed_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at91-sama5d2_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at91_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp288_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm_iproc_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
berlin2-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cc10001_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dln2-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
envelope-detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ep93xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_adc.c iio: exynos-adc: request second interupt only when touchscreen mode is used 2024-11-18 10:58:30 +01:00
fsl-imx25-gcq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hi8435.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hx711.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx7d_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ina2xx-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_mrfld_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8788_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc18xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2471.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2485.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2496.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1027.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1118.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1241.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1363.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max9611.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max11100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp320x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp3422.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp3911.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
men_z188_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson_saradc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mp2629_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mt6577_auxadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-lradc-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nau7802.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
npcm_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
palmas_gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-pm8xxx-xoadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-adc5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-iadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-vadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-vadc-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-vadc-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar-gyroadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rn5t618-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip_saradc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mps23_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mps25_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mpu13_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc27xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_adc_modulator.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spear_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc-core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stmpe-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stx104.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun4i-gpadc-iio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc081c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc084s021.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc108s102.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc128s052.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc161s626.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc0832.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc12138.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads124s08.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads1015.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads7950.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads8344.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads8688.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-tlc4541.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti_am335x_adc.c iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma() 2024-11-18 12:12:00 +01:00
twl4030-madc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl6030-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vf610_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
viperboard_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx-xadc-core.c iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds 2024-11-18 10:58:32 +01:00
xilinx-xadc-events.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx-xadc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00