linux/drivers/iio/adc
David Lechner e2cc390a66 iio: adc: ad7124: fix temperature channel
Fix temperature channel not working due to gain and offset not being
initialized.  For channels other than the voltage ones calibration is
skipped (which is OK).  However that results in the calibration register
values tracked in st->channels[i].cfg all being zero.  These zeros are
later written to hardware before a measurement is made which caused the
raw temperature readings to be always 8388608 (0x800000).

To fix it, we just make sure the gain and offset values are set to the
default values and still return early without doing an internal
calibration.

While here, add a comment explaining why we don't bother calibrating
the temperature channel.

Fixes: 47036a03a3 ("iio: adc: ad7124: Implement internal calibration at probe time")
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
History 2025-10-13 08:38:09 +01:00
..
88pm886-gpadc.c iio: adc: Add driver for Marvell 88PM886 PMIC ADC 2025-09-13 14:47:14 +01:00
ab8500-gpadc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ad799x.c iio: adc: ad799x: add reference voltage to ad7994 2025-08-16 11:57:08 +01:00
ad4000.c iio: adc: ad4000: don't use shift_right() 2025-07-13 15:36:25 +01:00
ad4030.c iio: adc: ad4030: Fix _scale value for common-mode channels 2025-10-13 08:38:08 +01:00
ad4080.c iio: adc: ad4080: add driver support 2025-06-09 07:45:35 +01:00
ad4130.c iio: Remove error prints for devm_add_action_or_reset() 2025-08-16 11:57:08 +01:00
ad4170-4.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ad4695.c iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS 2025-05-21 14:20:31 +01:00
ad4851.c iio: adc: ad4851: add spi 3-wire support 2025-07-06 10:37:51 +01:00
ad7091r-base.c iio: adc: ad7091r-base: Remove duplicate code on volatile reg check 2025-05-21 14:20:29 +01:00
ad7091r-base.h iio: adc: Fix typos in comments across various files 2024-10-05 12:09:15 +01:00
ad7091r5.c iio: adc: ad7091r5: make ad7091r5_init_info const 2025-07-06 10:37:51 +01:00
ad7091r8.c iio: adc: ad7091r8: make ad7091r_init_info const 2025-07-06 10:37:52 +01:00
ad7124.c iio: adc: ad7124: fix temperature channel 2025-10-13 08:38:09 +01:00
ad7173.c iio: adc: ad7173: support changing filter type 2025-09-13 15:16:07 +01:00
ad7191.c iio: adc: ad7191: add AD7191 2025-03-11 19:08:56 +00:00
ad7192.c IIO: New device support, features and cleanup for the 6.15 cycle. 2025-03-14 07:15:12 +01:00
ad7266.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
ad7280a.c iio: adc: ad7280a: fix ad7280_store_balance_timer() 2025-10-13 08:38:08 +01:00
ad7291.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
ad7292.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ad7298.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ad7380.c iio: adc: ad7380: fix SPI offload trigger rate 2025-10-13 08:38:08 +01:00
ad7405.c iio: adc: ad7405: add ad7405 driver 2025-06-26 19:32:52 +01:00
ad7476.c iio: adc: ad7476: Support ROHM BD79105 2025-08-16 13:21:21 +01:00
ad7606.c iio: adc: ad7606: add gain calibration support 2025-06-09 07:45:37 +01:00
ad7606.h iio: adc: ad7606: add gain calibration support 2025-06-09 07:45:37 +01:00
ad7606_bus_iface.h iio: adc: adi-axi-adc: add platform children support 2025-02-11 19:56:25 +00:00
ad7606_par.c iio: adc: ad7606_par: add ad7606c chips 2025-04-22 19:09:54 +01:00
ad7606_spi.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
ad7625.c iio: adc: ad7625: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:01:43 +00:00
ad7766.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ad7768-1.c iio: adc: ad7768-1: use devm_regulator_get_enable_read_voltage() 2025-08-25 15:34:20 +01:00
ad7779.c iio: adc: update ad7779 to use IIO backend 2025-09-10 19:46:59 +01:00
ad7780.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ad7791.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad7793.c iio: adc: ad7793: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:49 +00:00
ad7887.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ad7923.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ad7944.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
ad7949.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
ad9467.c iio: adc: ad9467: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:01:55 +00:00
ad_sigma_delta.c iio: adc: ad_sigma_delta: change to buffer predisable 2025-07-16 08:47:12 +01:00
ade9000.c iio: adc: add ade9000 support 2025-09-13 14:00:15 +01:00
adi-axi-adc.c iio: adc: adi-axi-adc: add axi_adc_num_lanes_set 2025-08-31 13:36:25 +01:00
aspeed_adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
at91-sama5d2_adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
at91_adc.c iio: adc: at91_adc: make at91_adc_caps const 2025-07-06 10:37:52 +01:00
axp20x_adc.c Char / Misc / IIO / other driver updates for 6.17-rc1 2025-07-29 09:52:01 -07:00
axp288_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
bcm_iproc_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
berlin2-adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
cc10001_adc.c iio: adc: cc10001_adc: make use of iio_for_each_active_channel() 2024-08-03 10:13:39 +01:00
cpcap-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
da9150-gpadc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
dln2-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
envelope-detector.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ep93xx_adc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
exynos_adc.c iio: adc: exynos_adc: Drop platform data support 2025-09-10 19:47:04 +01:00
fsl-imx25-gcq.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
gehc-pmc-adc.c iio: adc: Add support for the GE HealthCare PMC ADC 2024-10-06 14:00:15 +01:00
hi8435.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
hx711.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
imx7d_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
imx8qxp-adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
imx93_adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ina2xx-adc.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
industrialio-adc.c iio: adc: add helpers for parsing ADC nodes 2025-04-22 19:09:52 +01:00
ingenic-adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
intel_dc_ti_adc.c iio: adc: Add Intel Dollar Cove TI PMIC ADC driver 2025-09-10 19:47:05 +01:00
intel_mrfld_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
Kconfig iio: adc: Support ROHM BD79112 ADC/GPIO 2025-09-15 21:12:04 +01:00
lp8788_adc.c iio: adc: Convert to IIO_MAP() 2024-09-30 09:21:02 +01:00
lpc18xx_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
lpc32xx_adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ltc2309.c iio: adc: ltc2309: Fix endian type passed to be16_to_cpu() 2024-06-28 20:04:18 +01:00
ltc2471.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ltc2485.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
ltc2496.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ltc2497-core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ltc2497.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ltc2497.h module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Makefile iio: adc: Support ROHM BD79112 ADC/GPIO 2025-09-15 21:12:04 +01:00
max1027.c iio: adc: max1027: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
max1118.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
max1241.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
max1363.c iio: adc: max1363: Reorder mode_list[] entries 2025-06-09 07:45:19 +01:00
max9611.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
max11100.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
max11205.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
max11410.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
max34408.c iio: adc: Include cleanup.h when using guard() 2025-03-04 13:17:51 +00:00
max77541-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp320x.c iio: adc: mcp320x: Drop vendorless compatible strings 2024-09-03 18:49:44 +01:00
mcp3422.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mcp3564.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
mcp3911.c iio: adc: mcp3911: add reset management 2025-05-21 14:20:30 +01:00
men_z188_adc.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
meson_saradc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
mp2629_adc.c iio: adc: mp2629_adc: make mp2629_channels const 2025-07-06 10:37:52 +01:00
mt6359-auxadc.c iio: adc: mt6359: Add support for MediaTek MT6373 PMIC AUXADC 2025-07-13 15:36:26 +01:00
mt6360-adc.c iio: adc: mt6360-adc: use = { } instead of memset() 2025-06-26 19:32:55 +01:00
mt6370-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mt6577_auxadc.c iio: Remove error prints for devm_add_action_or_reset() 2025-08-16 11:57:08 +01:00
mxs-lradc-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
nau7802.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
nct7201.c iio: adc: add support for Nuvoton NCT7201 2025-05-21 14:22:32 +01:00
npcm_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
pac1921.c iio: Remove error prints for devm_add_action_or_reset() 2025-08-16 11:57:08 +01:00
pac1934.c IIO: New device support, features and cleanup for 6.18 2025-09-23 14:15:25 +02:00
palmas_gpadc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
qcom-pm8xxx-xoadc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
qcom-spmi-adc5.c iio: adc: qcom-spmi-adc5: Tidy up adc5_get_fw_data() error messages 2024-10-05 12:19:01 +01:00
qcom-spmi-iadc.c iio: adc: qcom-spmi-iadc: Fix wakeup source leaks on device unbind 2025-04-12 12:24:00 +01:00
qcom-spmi-rradc.c mailmap: update and consolidate Casey Connolly's name and email 2025-05-21 10:48:24 -07:00
qcom-spmi-vadc.c iio: adc: qcom-spmi-vadc: use scoped device_for_each_child_node() 2024-10-05 12:09:14 +01:00
qcom-vadc-common.c iio: adc: qcom-vadc: make scale_adc5_fn const 2025-07-06 10:37:52 +01:00
rcar-gyroadc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
rn5t618-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
rockchip_saradc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
rohm-bd79112.c iio: adc: Support ROHM BD79112 ADC/GPIO 2025-09-15 21:12:04 +01:00
rohm-bd79124.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
rtq6056.c iio: adc: rtq6056: Correct the sign bit index 2025-10-13 08:38:08 +01:00
rzg2l_adc.c Linux 6.17-rc3 2025-09-13 15:00:48 +01:00
sc27xx_adc.c iio: adc: sc27xx_adc: make use of regmap_clear_bits(), regmap_set_bits() 2024-06-25 21:04:45 +01:00
sd_adc_modulator.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sophgo-cv1800b-adc.c iio: adc: sophgo-saradc: Add driver for Sophgo CV1800B SARADC 2024-09-03 20:05:03 +01:00
spear_adc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
stm32-adc-core.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
stm32-adc-core.h iio: adc: stm32: add oversampling support 2025-05-21 14:20:28 +01:00
stm32-adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
stm32-dfsdm-adc.c iio: adc: stm32-dfsdm: fix st,adc-alt-channel property handling 2025-10-13 08:38:08 +01:00
stm32-dfsdm-core.c iio: adc: stm32-dfsdm: Fix build warnings about export.h 2025-06-26 19:32:52 +01:00
stm32-dfsdm.h iio: adc: stm32-dfsdm: add id registers support 2023-01-08 13:11:03 +00:00
stmpe-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
sun4i-gpadc-iio.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
sun20i-gpadc-iio.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-adc081c.c iio: adc: ti-adc081c: use individual model structures instead of array 2025-08-16 11:57:05 +01:00
ti-adc084s021.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
ti-adc108s102.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ti-adc128s052.c iio: adc: adc128s052: Support ROHM BD7910[0,1,2,3] 2025-08-18 20:12:25 +01:00
ti-adc161s626.c iio: adc: ti-adc161s626: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:02:16 +00:00
ti-adc0832.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-adc12138.c iio: adc: ti-adc12138: Simplify with devm_clk_get_enabled() 2025-08-16 11:57:06 +01:00
ti-ads124s08.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-ads131e08.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
ti-ads1015.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1100.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1119.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1298.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ti-ads7138.c iio: adc: Add driver for ADS7128 / ADS7138 2025-02-16 15:52:22 +00:00
ti-ads7924.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
ti-ads7950.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ti-ads8344.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ti-ads8688.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-lmp92064.c iio: adc: ti-lmp92064: use = { } instead of memset() 2025-06-26 19:32:56 +01:00
ti-tlc4541.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-tsc2046.c iio: adc: ti-tsc2046: use us_to_ktime() where appropriate 2025-08-16 14:06:06 +01:00
ti_am335x_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
twl4030-madc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
twl6030-gpadc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
vf610_adc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
viperboard_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
xilinx-ams.c iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK 2025-08-25 12:22:52 +01:00
xilinx-xadc-core.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
xilinx-xadc-events.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
xilinx-xadc.h iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00