Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: i2c: ov5675: 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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
046da914 b268547c

-41
-41
drivers/media/i2c/ov5675.c
··· 513 513 /* To serialize asynchronus callbacks */ 514 514 struct mutex mutex; 515 515 516 - /* Streaming on/off */ 517 - bool streaming; 518 - 519 516 /* True if the device has been identified */ 520 517 bool identified; 521 518 }; ··· 965 968 pm_runtime_put(&client->dev); 966 969 } 967 970 968 - ov5675->streaming = enable; 969 971 mutex_unlock(&ov5675->mutex); 970 972 971 973 return ret; ··· 1016 1020 1017 1021 /* 8192 xvclk cycles prior to the first SCCB transation */ 1018 1022 usleep_range(delay_us, delay_us * 2); 1019 - 1020 - return 0; 1021 - } 1022 - 1023 - static int __maybe_unused ov5675_suspend(struct device *dev) 1024 - { 1025 - struct v4l2_subdev *sd = dev_get_drvdata(dev); 1026 - struct ov5675 *ov5675 = to_ov5675(sd); 1027 - 1028 - mutex_lock(&ov5675->mutex); 1029 - if (ov5675->streaming) 1030 - ov5675_stop_streaming(ov5675); 1031 - 1032 - mutex_unlock(&ov5675->mutex); 1033 - 1034 - return 0; 1035 - } 1036 - 1037 - static int __maybe_unused ov5675_resume(struct device *dev) 1038 - { 1039 - struct v4l2_subdev *sd = dev_get_drvdata(dev); 1040 - struct ov5675 *ov5675 = to_ov5675(sd); 1041 - int ret; 1042 - 1043 - mutex_lock(&ov5675->mutex); 1044 - if (ov5675->streaming) { 1045 - ret = ov5675_start_streaming(ov5675); 1046 - if (ret) { 1047 - ov5675->streaming = false; 1048 - ov5675_stop_streaming(ov5675); 1049 - mutex_unlock(&ov5675->mutex); 1050 - return ret; 1051 - } 1052 - } 1053 - 1054 - mutex_unlock(&ov5675->mutex); 1055 1023 1056 1024 return 0; 1057 1025 } ··· 1366 1406 } 1367 1407 1368 1408 static const struct dev_pm_ops ov5675_pm_ops = { 1369 - SET_SYSTEM_SLEEP_PM_OPS(ov5675_suspend, ov5675_resume) 1370 1409 SET_RUNTIME_PM_OPS(ov5675_power_off, ov5675_power_on, NULL) 1371 1410 }; 1372 1411