media: i2c: imx214: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and restarting it at system resume time, requires coordinated action between the bridge driver and the camera sensor driver. This is handled by the bridge driver calling the sensor's .s_stream() handler at system suspend and resume time. There is thus no need for the sensor to independently implement system sleep PM operations. Drop them. The streaming field of the driver's private structure is now unused, drop it as well. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
c628b64d31
commit
0484cde1df
@ -58,8 +58,6 @@ struct imx214 {
|
||||
* and start streaming.
|
||||
*/
|
||||
struct mutex mutex;
|
||||
|
||||
bool streaming;
|
||||
};
|
||||
|
||||
struct reg_8 {
|
||||
@ -790,7 +788,6 @@ static int imx214_s_stream(struct v4l2_subdev *subdev, int enable)
|
||||
pm_runtime_put(imx214->dev);
|
||||
}
|
||||
|
||||
imx214->streaming = enable;
|
||||
return 0;
|
||||
|
||||
err_rpm_put:
|
||||
@ -906,39 +903,6 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __maybe_unused imx214_suspend(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
struct imx214 *imx214 = to_imx214(sd);
|
||||
|
||||
if (imx214->streaming)
|
||||
imx214_stop_streaming(imx214);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused imx214_resume(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
struct imx214 *imx214 = to_imx214(sd);
|
||||
int ret;
|
||||
|
||||
if (imx214->streaming) {
|
||||
ret = imx214_start_streaming(imx214);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
imx214_stop_streaming(imx214);
|
||||
imx214->streaming = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int imx214_probe(struct i2c_client *client)
|
||||
{
|
||||
struct device *dev = &client->dev;
|
||||
@ -1099,7 +1063,6 @@ static const struct of_device_id imx214_of_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, imx214_of_match);
|
||||
|
||||
static const struct dev_pm_ops imx214_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(imx214_suspend, imx214_resume)
|
||||
SET_RUNTIME_PM_OPS(imx214_power_off, imx214_power_on, NULL)
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user