2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/iio/adc
Claudiu Beznea c69e13965f iio: adc: rzg2l_adc: Set driver data before enabling runtime PM
When stress-testing the system by repeatedly unbinding and binding the ADC
device in a loop, and the ADC is a supplier for another device (e.g., a
thermal hardware block that reads temperature through the ADC), it may
happen that the ADC device is runtime-resumed immediately after runtime PM
is enabled, triggered by its consumer. At this point, since drvdata is not
yet set and the driver's runtime PM callbacks rely on it, a crash can
occur. To avoid this, set drvdata just after it was allocated.

Fixes: 89ee8174e8 ("iio: adc: rzg2l_adc: Simplify the runtime PM code")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20250810123328.800104-3-claudiu.beznea.uj@bp.renesas.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16 14:52:43 +01:00
..
ab8500-gpadc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
ad799x.c iio: normalize array sentinel style 2025-04-22 19:10:04 +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: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ad4080.c iio: adc: ad4080: add driver support 2025-06-09 07:45:35 +01:00
ad4130.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02: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
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
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
ad7124.c iio: adc: ad7124: fix channel lookup in syscalib functions 2025-08-11 21:35:01 +01:00
ad7173.c iio: adc: ad7173: prevent scan if too many setups requested 2025-08-11 21:35:01 +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: normalize array sentinel style 2025-04-22 19:10:04 +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 missing max_conversion_rate_hz on adaq4381-4 2025-08-16 14:32:35 +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 BU79100G 2025-06-09 07:45:36 +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
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
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 treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ad7779.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +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: ad7949: use spi_is_bpw_supported() 2025-06-29 17:15:39 +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
adi-axi-adc.c This is the usual collection of primarily clk driver updates. The big part of 2025-07-31 13:36:27 -07:00
aspeed_adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
at91_adc.c iio: adc: at91_adc: make at91_adc_caps const 2025-07-06 10:37:52 +01:00
at91-sama5d2_adc.c iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS 2025-05-21 14:20:32 +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: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +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: normalize array sentinel style 2025-04-22 19:10:04 +01:00
da9150-gpadc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
dln2-adc.c iio: adc: dln2-adc: use = { } instead of memset() 2025-06-26 19:32:55 +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: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +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: hx711: use struct with aligned_s64 timestamp 2025-05-21 14:20:27 +01:00
imx7d_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
imx8qxp-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
imx93_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +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_mrfld_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
Kconfig iio: adc: bd79124: Add GPIOLIB dependency 2025-08-16 13:25:35 +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: Add basic support for AD4170-4 2025-07-14 19:20:51 +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: mcp3564: use devm_regulator_get_enable_read_voltage() 2024-08-03 10:13:43 +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: normalize array sentinel style 2025-04-22 19:10:04 +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: adc: mt6577_auxadc: Fix kernel panic on suspend 2023-10-11 15:54:40 +01:00
mxs-lradc-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
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: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
pac1934.c iio: adc: PAC1934: fix typo in documentation link 2025-05-21 14:20:28 +01:00
palmas_gpadc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +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: normalize array sentinel style 2025-04-22 19:10:04 +01:00
rn5t618-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
rockchip_saradc.c iio: adc: rockchip_saradc: use = { } instead of memset() 2025-06-26 19:32:55 +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: use = { } instead of memset() 2025-06-26 19:32:55 +01:00
rzg2l_adc.c iio: adc: rzg2l_adc: Set driver data before enabling runtime PM 2025-08-16 14:52:43 +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: normalize array sentinel style 2025-04-22 19:10:04 +01:00
stm32-adc-core.c Char / Misc / IIO / other driver updates for 6.17-rc1 2025-07-29 09:52:01 -07:00
stm32-adc-core.h iio: adc: stm32: add oversampling support 2025-05-21 14:20:28 +01:00
stm32-adc.c iio: adc: stm32-adc: make stm32_adc_trig_info const 2025-07-06 10:37:52 +01:00
stm32-dfsdm-adc.c iio: adc: stm32-dfsdm: Fix build warnings about export.h 2025-06-26 19:32:52 +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: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
sun4i-gpadc-iio.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
sun20i-gpadc-iio.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti_am335x_adc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
ti-adc081c.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-adc084s021.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-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: ti-adc128s052: Drop variable vref 2025-05-21 14:20:30 +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: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +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: ti-ads131e08: Fix spelling mistake "tweek" -> "tweak" 2025-06-26 19:32:51 +01:00
ti-ads1015.c iio: adc: ti-ads1015: use = { } instead of memset() 2025-06-26 19:32:56 +01:00
ti-ads1100.c iio: adc: ti-ads1100: Switch to sparse friendly iio_device_claim/release_direct() 2025-04-22 19:09:55 +01:00
ti-ads1119.c iio: adc: ti-ads1119: use = { } instead of memset() 2025-06-26 19:32:56 +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: ti-ads7924 Drop unnecessary function parameters 2025-03-11 19:09:17 +00: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 = { } instead of memset() 2025-06-26 19:32:56 +01:00
twl4030-madc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
twl6030-gpadc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
vf610_adc.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
viperboard_adc.c
xilinx-ams.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00: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