summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-05-24 18:11:19 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-05-24 18:11:19 -0600
commitda205d058ded9b8bb11ad8d8d3d8d93df0f91e24 (patch)
tree47027c160a6871d7d98902d271365e94cb9d0c92
parent55301e3cf92bc26a4cb997629cf3dddebcdf2b48 (diff)
CR ENGR00007753: Add gpio function in camera suspend function to reduce
drive strength. http://www.bitshrine.org/gpp/linux-2.6.19.2-mx-add_gpio_function_camera_resume.patch
-rw-r--r--drivers/media/video/mxc/capture/mx27_v4l2_capture.c5
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c5
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;
}