linux/drivers/iio/accel
Jiale Yao dd30c10ff6 iio: accel: kxcjk-1013: reject duplicate event disable
The IIO core does not filter duplicate writes to the event enable
attribute. kxcjk1013_write_event_config() already ignores repeated
enable requests, but a repeated disable request still calls
kxcjk1013_set_power_state(data, false), dropping a runtime PM reference
that was not acquired for this request. This can underflow the runtime
PM usage count and trigger a "Runtime PM usage count underflow" warning.

Return early when the requested state already matches ev_enable_state.

Fixes: b4b491c083 ("iio: accel: kxcjk-1013: Support thresholds")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
History 2026-09-30 18:59:56 +01:00
..
adis16201.c iio: accel: fix typo celcius to Celsius 2026-03-21 19:09:41 +00:00
adis16209.c iio: accel: fix typo celcius to Celsius 2026-03-21 19:09:41 +00:00
adxl313.h iio: accel: adxl313: implement power-save on inactivity 2025-07-13 15:36:27 +01:00
adxl313_core.c iio: accel: adxl313: Use dev_err_probe() 2026-04-27 09:58:19 +01:00
adxl313_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl313_spi.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl345.h iio: accel: adxl345: simplify measure enable 2025-06-26 19:32:55 +01:00
adxl345_core.c iio: accel: adxl345: Implement event scaling for ABI compliance 2026-03-01 12:04:23 +00:00
adxl345_i2c.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
adxl345_spi.c iio: Initialize spi_device_id arrays using member names 2026-06-30 00:15:56 +01:00
adxl355.h drivers: iio: accel: Add support for ADXL359 device 2022-11-23 19:44:04 +00:00
adxl355_core.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
adxl355_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl355_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
adxl367.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
adxl367.h iio: accel: add ADXL367 driver 2022-02-21 19:33:06 +00:00
adxl367_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl367_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
adxl372.c iio: accel: adxl372: Use dev_err_probe() 2026-04-27 09:58:20 +01:00
adxl372.h iio: accel: adxl372: add support for ADXL371 2026-03-21 11:22:43 +00:00
adxl372_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl372_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
adxl380.c iio: accel: adxl380: Use devm-managed mutex initialization 2026-04-27 09:58:19 +01:00
adxl380.h iio: accel: adxl380: Add support for 1 kHz sampling frequency 2026-01-16 19:42:08 +00:00
adxl380_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
adxl380_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
bma180.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
bma220.h iio: accel: bma220: move set_wdt() out of bma220_core 2025-11-09 12:57:03 +00:00
bma220_core.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
bma220_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
bma220_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
bma400.h iio: accel: bma400: Replace bit shifts with FIELD_PREP() and FIELD_GET() 2025-10-19 11:59:23 +01:00
bma400_core.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
bma400_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
bma400_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
bmc150-accel-core.c IIO new device support, features, cleanup for 7.3 2026-08-19 09:45:01 +02:00
bmc150-accel-i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
bmc150-accel-spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
bmc150-accel.h iio: accel: bmc150: Fix irq assumption regression 2025-11-11 20:22:23 +00:00
bmi088-accel-core.c iio: accel: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:56:12 +01:00
bmi088-accel-i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
bmi088-accel-spi.c iio: Initialize spi_device_id arrays using member names 2026-06-30 00:15:56 +01:00
bmi088-accel.h iio: accel: bmi088: Add support for bmi090l accel 2022-06-11 14:35:28 +01:00
cros_ec_accel_legacy.c iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength() 2024-07-29 20:31:08 +01:00
da280.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
da311.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
dmard06.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
dmard09.c iio: accel: dmard09: Implement IIO_CHAN_INFO_SCALE 2026-07-12 03:10:06 +01:00
dmard10.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
fxls8962af-core.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
fxls8962af-i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
fxls8962af-spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
fxls8962af.h iio: accel: fxls8962af: add fxls8967af support 2024-12-07 17:11:01 +00:00
hid-sensor-accel-3d.c iio: hid-sensors: Use implicit NULL pointer checks 2026-07-07 03:12:51 +01:00
Kconfig iio: accel: adxl372: add support for ADXL371 2026-03-21 11:22:43 +00:00
kionix-kx022a-i2c.c iio: accel: kx022a: Support KX134-1211 2024-12-07 17:52:39 +00:00
kionix-kx022a-spi.c iio: accel: kx022a: Support KX134-1211 2024-12-07 17:52:39 +00:00
kionix-kx022a.c iio: accel: kionix-kx022a: Prevent memory leak and fix state 2026-09-06 22:36:00 +01:00
kionix-kx022a.h iio: kx022a: document new chip_info structure members 2024-12-08 18:26:31 +00:00
kxcjk-1013.c iio: accel: kxcjk-1013: reject duplicate event disable 2026-09-30 18:59:56 +01:00
kxsd9-i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
kxsd9-spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
kxsd9.c iio: accel: kxsd9: fix runtime PM imbalance on write_raw() error 2026-06-29 23:24:46 +01:00
kxsd9.h iio: accel: kxsd9: Make kxsd9_common_remove() return void 2021-10-19 08:30:45 +01:00
Makefile iio: accel: bma220: add i2c module 2025-10-19 11:59:20 +01:00
mc3230.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
mma7455.h iio: accel: mma7455: Make mma7455_core_remove() return void 2021-10-19 08:30:45 +01:00
mma7455_core.c iio: accel: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
mma7455_i2c.c iio: Initialize i2c_device_id arrays using member names 2026-05-31 11:01:46 +01:00
mma7455_spi.c iio: Drop unused assignment of spi_device_id driver data 2026-06-30 00:15:56 +01:00
mma7660.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mma8452.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mma9551.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
mma9551_core.c iio: accel: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:56:12 +01:00
mma9551_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mma9553.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
msa311.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
mxc4005.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
mxc6255.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sca3000.c iio: accel: sca3000: fix frequency divider condition check 2026-08-31 00:52:42 +01:00
sca3300.c iio: Initialize spi_device_id arrays using member names 2026-06-30 00:15:56 +01:00
ssp_accel_sensor.c iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro 2026-05-31 11:01:46 +01:00
st_accel.h iio: accel: st_accel: add support for LIS2DS12 2024-06-25 21:04:49 +01:00
st_accel_buffer.c iio:st-sensors: Remove duplicate MODULE_* 2022-02-18 11:36:54 +00:00
st_accel_core.c iio: accel: iis328dq: fix gain values 2026-01-11 12:00:08 +00:00
st_accel_i2c.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
st_accel_spi.c Linux 7.2-rc2 2026-07-06 16:59:47 +01:00
stk8ba50.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00
stk8312.c iio: accel: Remove redundant dev_err()/dev_err_probe() 2026-07-27 22:13:07 +01:00