diff options
| author | Tarang Raval <[email protected]> | 2025-03-06 05:34:44 +0000 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2025-04-25 08:15:32 +0000 |
| commit | 5bd6b8c1bb2d49d5ff15c7c47d6b33d2d38785f0 (patch) | |
| tree | bf5998f374aea3c05036c248c6c03e21772e3fdf | |
| parent | media: i2c: imx219: switch to {enable,disable}_streams (diff) | |
| download | kernel-5bd6b8c1bb2d49d5ff15c7c47d6b33d2d38785f0.tar.gz kernel-5bd6b8c1bb2d49d5ff15c7c47d6b33d2d38785f0.zip | |
media: i2c: imx219: media: i2c: imx219: Enable runtime PM autosuspend
Use pm_runtime_put_autosuspend() instead of pm_runtime_put()
to allow autosuspend. Set a 1000ms autosuspend delay in
imx219_probe() to improve power efficiency.
Signed-off-by: Tarang Raval <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
| -rw-r--r-- | drivers/media/i2c/imx219.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index 1b4eb531b315..3b4f68543342 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -771,7 +771,8 @@ static int imx219_enable_streams(struct v4l2_subdev *sd, return 0; err_rpm_put: - pm_runtime_put(&client->dev); + pm_runtime_mark_last_busy(&client->dev); + pm_runtime_put_autosuspend(&client->dev); return ret; } @@ -792,7 +793,8 @@ static int imx219_disable_streams(struct v4l2_subdev *sd, __v4l2_ctrl_grab(imx219->vflip, false); __v4l2_ctrl_grab(imx219->hflip, false); - pm_runtime_put(&client->dev); + pm_runtime_mark_last_busy(&client->dev); + pm_runtime_put_autosuspend(&client->dev); return ret; } @@ -1272,6 +1274,8 @@ static int imx219_probe(struct i2c_client *client) } pm_runtime_idle(dev); + pm_runtime_set_autosuspend_delay(dev, 1000); + pm_runtime_use_autosuspend(dev); return 0; |
