Commit 0b45b044 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

s5k3l6xx: remove the autosuspend delay

simplify runtime pm so that it's handled just like any other camera
driver does it: remove an autosuspend delay for runtime pm. this delay
is an old copy paste relict and an unneeded magic number.

use the non-autosuspend functions only and it's not needed to "mark last busy":
https://www.kernel.org/doc/html/latest/power/runtime_pm.html#autosuspend-or-automatically-delayed-suspends
parent a08d4a7d
Pipeline #67564 passed with stage
in 66 minutes and 4 seconds
......@@ -645,8 +645,7 @@ static int s5k3l6xx_s_stream(struct v4l2_subdev *sd, int on)
} else {
mutex_lock(&state->lock);
s5k3l6xx_hw_set_stream(state, 0);
pm_runtime_mark_last_busy(&c->dev);
pm_runtime_put_autosuspend(&c->dev);
pm_runtime_put(&c->dev);
}
ret = s5k3l6xx_clear_error(state);
if (!ret)
......@@ -869,8 +868,7 @@ static int s5k3l6xx_s_ctrl(struct v4l2_ctrl *ctrl)
ret = s5k3l6xx_clear_error(state);
if (in_use) { // came from other context than resume, need to manage PM
pm_runtime_mark_last_busy(&c->dev);
pm_runtime_put_autosuspend(&c->dev);
pm_runtime_put(&c->dev);
}
unlock:
mutex_unlock(&state->lock);
......@@ -1272,8 +1270,6 @@ static int s5k3l6xx_probe(struct i2c_client *c)
pm_runtime_set_active(&c->dev);
pm_runtime_enable(&c->dev);
pm_runtime_set_autosuspend_delay(&c->dev, 3000);
pm_runtime_use_autosuspend(&c->dev);
// Default frame.
state->frame_fmt = &s5k3l6xx_frames[0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment