Re: [PATCH 11/13] media: imx355: Use pm_runtime autosuspend_delay
From: Jacopo Mondi
Date: Thu May 07 2026 - 10:51:30 EST
Hi Dave
On Wed, May 06, 2026 at 07:23:49PM +0100, Dave Stevenson wrote:
> Avoid powering the sensor up and down unnecessarily by using
> pm_runtime's autosuspend_delay feature.
>
> Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
Reviewed-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
> ---
> 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
>
>