summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch
new file mode 100644
index 00000000..66c4e173
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch
@@ -0,0 +1,57 @@
1From 52bfcc9b6bcb30cf81589c483f1344c568be7300 Mon Sep 17 00:00:00 2001
2From: Sergio Aguirre <saaguirre@ti.com>
3Date: Thu, 15 Jul 2010 17:53:44 -0500
4Subject: [PATCH 58/75] mt9t112: Do init_camera every powerup
5
6This is because we want to ensure we always come from a known state.
7
8Probably this could be revisited later for optimization.
9
10Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
11---
12 drivers/media/video/mt9t112.c | 17 ++++++++---------
13 1 files changed, 8 insertions(+), 9 deletions(-)
14
15diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c
16index 98a4ea9..eebc2b5 100644
17--- a/drivers/media/video/mt9t112.c
18+++ b/drivers/media/video/mt9t112.c
19@@ -982,6 +982,8 @@ static int mt9t112_v4l2_int_s_power(struct v4l2_int_device *s,
20 {
21 struct mt9t112_priv *priv = s->priv;
22 struct i2c_client *client = priv->client;
23+ u16 param = (MT9T112_FLAG_PCLK_RISING_EDGE &
24+ priv->info.flags) ? 0x0001 : 0x0000;
25 int ret;
26
27 switch (power) {
28@@ -1014,20 +1016,17 @@ static int mt9t112_v4l2_int_s_power(struct v4l2_int_device *s,
29 return ret;
30 }
31 if (!(priv->flags & INIT_DONE)) {
32- u16 param = (MT9T112_FLAG_PCLK_RISING_EDGE &
33- priv->info.flags) ? 0x0001 : 0x0000;
34-
35 ECHECKER(ret, mt9t112_detect(client));
36- ECHECKER(ret, mt9t112_init_camera(client));
37-
38- /* Invert PCLK (Data sampled on falling edge of pixclk) */
39- mt9t112_reg_write(ret, client, 0x3C20, param);
40-
41- mdelay(5);
42
43 priv->flags |= INIT_DONE;
44 }
45
46+ ECHECKER(ret, mt9t112_init_camera(client));
47+
48+ /* Invert PCLK (Data sampled on falling edge of pixclk) */
49+ mt9t112_reg_write(ret, client, 0x3C20, param);
50+
51+ mdelay(5);
52 mt9t112_mcu_write(ret, client, VAR(26, 7),
53 mt9t112_pixfmt_to_fmt(priv->pix.pixelformat));
54 mt9t112_mcu_write(ret, client, VAR(26, 9),
55--
561.6.6.1
57