MLK-24585: media: ov5640: fix state out of sync with sensor real state issue
Variable streaming is used to track ov5640 working state and control to turn on/off ov5640. For normal case, streaming will be set to false when user call STREAMOFF ioctl, but for some special cases, process will be killed at any time and STREAMOFF ioctl will be ignored in this case. It leads to sensor software state is out of sync with its real state, so driver force to set streaming to false when call ov5640_set_power_off(). It will keep software state sync with sensor real state. Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
f663d68a83
commit
83f2055886
|
@ -2049,6 +2049,7 @@ static void ov5640_set_power_off(struct ov5640_dev *sensor)
|
|||
ov5640_power(sensor, false);
|
||||
regulator_bulk_disable(OV5640_NUM_SUPPLIES, sensor->supplies);
|
||||
clk_disable_unprepare(sensor->xclk);
|
||||
sensor->streaming = false;
|
||||
}
|
||||
|
||||
static int ov5640_set_power(struct ov5640_dev *sensor, bool on)
|
||||
|
|
Loading…
Reference in New Issue