[PATCH v3 0/2] iio: gyro: mpu3050: Fix runtime PM refcount leak in trigger enable path

From: Xiangwu Lai

Date: Tue Nov 03 2026 - 04:25:10 EST


From: laixiangwu <laixiangwu@xxxxxxxxxxxxxxxxxxxx>

Hi Jonathan,

This is a repost of the v2 series as a new top-level thread, as
requested. There are no code changes since v2.

For context, this series fixes a runtime PM refcount leak in the
mpu3050 data ready trigger enable path: patch 1 splits the enable
and disable paths out of mpu3050_drdy_trigger_set_state() into
separate helpers, and patch 2 applies the fix on top, using
pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which
also keeps the usage counter balanced when the resume fails.

Changes in v3:
- no code changes, the series is reposted as a new top-level thread
(v2 was mistakenly sent as a reply to the review comments).

Changes in v2:
- split the enable and disable paths out of
mpu3050_drdy_trigger_set_state() into a precursor patch, as
suggested by the reviewer.
- use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(),
as suggested by the reviewer.

v2: https://lore.kernel.org/r/20261101092327.197-1-laixiangwu@xxxxxxxxxxxxxxxxxxxx/
v1: https://lore.kernel.org/r/20261030084305.1660-1-laixiangwu@xxxxxxxxxxxxxxxxxxxx/

laixiangwu (2):
iio: gyro: mpu3050: Split data ready trigger enable/disable into
helpers
iio: gyro: mpu3050: Fix runtime PM refcount leak in trigger enable
path

drivers/iio/gyro/mpu3050-core.c | 182 +++++++++++++++++++-------------
1 file changed, 108 insertions(+), 74 deletions(-)

--
2.50.1.windows.1