diff options
-rw-r--r-- | drivers/media/video/mxc/capture/mx27_v4l2_capture.c | 5 | ||||
-rw-r--r-- | drivers/media/video/mxc/capture/mxc_v4l2_capture.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/mxc/capture/mx27_v4l2_capture.c b/drivers/media/video/mxc/capture/mx27_v4l2_capture.c index 80693d75d674..0a1a92bbeebd 100644 --- a/drivers/media/video/mxc/capture/mx27_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mx27_v4l2_capture.c @@ -1885,6 +1885,9 @@ static void init_camera_struct(cam_data * cam) spin_lock_init(&cam->int_lock); } +extern void gpio_sensor_active(void); +extern void gpio_sensor_inactive(void); + /*! * camera_power function * Turn Sensor power On/Off @@ -1896,10 +1899,12 @@ static void init_camera_struct(cam_data * cam) static u8 camera_power(bool cameraOn) { if (cameraOn == true) { + gpio_sensor_active(); csi_enable_mclk(csi_mclk_flag_backup, true, true); } else { csi_mclk_flag_backup = csi_read_mclk_flag(); csi_enable_mclk(csi_mclk_flag_backup, false, false); + gpio_sensor_inactive(); } return 0; } diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c index c5239517d5e3..1e92f6bc8c30 100644 --- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c @@ -1683,6 +1683,9 @@ static void init_camera_struct(cam_data * cam) spin_lock_init(&cam->int_lock); } +extern void gpio_sensor_active(void); +extern void gpio_sensor_inactive(void); + /*! * camera_power function * Turn Sensor power On/Off @@ -1694,10 +1697,12 @@ static void init_camera_struct(cam_data * cam) static u8 camera_power(bool cameraOn) { if (cameraOn == true) { + gpio_sensor_active(); ipu_csi_enable_mclk(csi_mclk_flag_backup, true, true); } else { csi_mclk_flag_backup = ipu_csi_read_mclk_flag(); ipu_csi_enable_mclk(csi_mclk_flag_backup, false, false); + gpio_sensor_inactive(); } return 0; } |