[PATCH 11/13] media: imx355: Use pm_runtime autosuspend_delay

From: Dave Stevenson

Date: Wed May 06 2026 - 14:30:35 EST


Avoid powering the sensor up and down unnecessarily by using
pm_runtime's autosuspend_delay feature.

Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
---
drivers/media/i2c/imx355.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index d8d7cc0ceab9..c6fcd649c32a 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -1068,7 +1068,7 @@ static int imx355_set_stream(struct v4l2_subdev *sd, int enable)
goto err_rpm_put;
} else {
imx355_stop_streaming(imx355);
- pm_runtime_put(imx355->dev);
+ pm_runtime_put_autosuspend(imx355->dev);
}

/* vflip and hflip cannot change during streaming */
@@ -1080,7 +1080,7 @@ static int imx355_set_stream(struct v4l2_subdev *sd, int enable)
return ret;

err_rpm_put:
- pm_runtime_put(imx355->dev);
+ pm_runtime_put_autosuspend(imx355->dev);
err_unlock:
mutex_unlock(&imx355->mutex);

@@ -1431,6 +1431,8 @@ static int imx355_probe(struct i2c_client *client)
pm_runtime_set_active(imx355->dev);
pm_runtime_enable(imx355->dev);
pm_runtime_idle(imx355->dev);
+ pm_runtime_set_autosuspend_delay(imx355->dev, 1000);
+ pm_runtime_use_autosuspend(imx355->dev);

ret = v4l2_async_register_subdev_sensor(&imx355->sd);
if (ret < 0)

--
2.34.1