mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
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 <tarang.raval@siliconsignals.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
838a525569
commit
5bd6b8c1bb
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user