diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-09-14 21:16:49 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 10:40:00 +0300 |
commit | b8074db07429b845b805416d261b502f814a80fe (patch) | |
tree | e98dcf6b0d5a8bd579f39c1e378e30257c8d1251 /drivers/media/i2c/imx219.c | |
parent | 0484cde1dfaacbf8748eb89ea23c274b72466fe3 (diff) | |
download | linux-b8074db07429b845b805416d261b502f814a80fe.tar.xz |
media: i2c: imx219: 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: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/imx219.c')
-rw-r--r-- | drivers/media/i2c/imx219.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index e247e46db6c0..af29398c657d 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -479,9 +479,6 @@ struct imx219 { /* Current mode */ const struct imx219_mode *mode; - /* Streaming on/off */ - bool streaming; - /* Two or Four lanes */ u8 lanes; }; @@ -992,8 +989,6 @@ static int imx219_set_stream(struct v4l2_subdev *sd, int enable) imx219_stop_streaming(imx219); } - imx219->streaming = enable; - unlock: v4l2_subdev_unlock_state(state); return ret; @@ -1045,41 +1040,6 @@ static int imx219_power_off(struct device *dev) return 0; } -static int __maybe_unused imx219_suspend(struct device *dev) -{ - struct v4l2_subdev *sd = dev_get_drvdata(dev); - struct imx219 *imx219 = to_imx219(sd); - - if (imx219->streaming) - imx219_stop_streaming(imx219); - - return 0; -} - -static int __maybe_unused imx219_resume(struct device *dev) -{ - struct v4l2_subdev *sd = dev_get_drvdata(dev); - struct imx219 *imx219 = to_imx219(sd); - struct v4l2_subdev_state *state; - int ret; - - if (imx219->streaming) { - state = v4l2_subdev_lock_and_get_active_state(sd); - ret = imx219_start_streaming(imx219, state); - v4l2_subdev_unlock_state(state); - if (ret) - goto error; - } - - return 0; - -error: - imx219_stop_streaming(imx219); - imx219->streaming = false; - - return ret; -} - static int imx219_get_regulators(struct imx219 *imx219) { struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd); @@ -1465,7 +1425,6 @@ static const struct of_device_id imx219_dt_ids[] = { MODULE_DEVICE_TABLE(of, imx219_dt_ids); static const struct dev_pm_ops imx219_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(imx219_suspend, imx219_resume) SET_RUNTIME_PM_OPS(imx219_power_off, imx219_power_on, NULL) }; |