From: Dominic Curran <dcurran@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Subject: [OMAPZOOM][PATCH] OV3640: Make camera sensor goto standby.
Date: Sun, 15 Mar 2009 19:20:32 -0500 [thread overview]
Message-ID: <200903151920.32085.dcurran@ti.com> (raw)
From: Dominic Curran <dcurran@ti.com>
Subject: [OMAPZOOM][PATCH] OV3640: Make camera sensor goto standby.
This patch ensures that the OV3640 goes/comes back from standby
when the kernel requests the appropriate power state.
This also seems to fix an issue where ECC errors are seen at STREAMON time.
This could possibly be because the sensor is probably still streaming when the
receiver is being setup. Putting the sensor into standby would stop it
streaming until setup of reciever is complete.
Signed-off-by: Dominic Curran <dcurran@ti.com>
---
arch/arm/mach-omap2/board-3430sdp.c | 4 +++-
arch/arm/mach-omap2/board-ldp.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
Index: omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
===================================================================
--- omapzoom04.orig/arch/arm/mach-omap2/board-3430sdp.c
+++ omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
@@ -908,7 +908,8 @@ static int ov3640_sensor_power_set(enum
mdelay(10);
enable_fpga_vio_1v8(1);
udelay(100);
- }
+ } else
+ omap_set_gpio_dataout(OV3640_STANDBY_GPIO, 0);
break;
case V4L2_POWER_OFF:
printk(KERN_DEBUG "ov3640_sensor_power_set(OFF)\n");
@@ -932,6 +933,7 @@ static int ov3640_sensor_power_set(enum
break;
case V4L2_POWER_STANDBY:
printk(KERN_DEBUG "ov3640_sensor_power_set(STANDBY)\n");
+ omap_set_gpio_dataout(OV3640_STANDBY_GPIO, 1);
break;
}
previous_power = power;
Index: omapzoom04/arch/arm/mach-omap2/board-ldp.c
===================================================================
--- omapzoom04.orig/arch/arm/mach-omap2/board-ldp.c
+++ omapzoom04/arch/arm/mach-omap2/board-ldp.c
@@ -742,7 +742,8 @@ static int ov3640_sensor_power_set(enum
omap_set_gpio_dataout(OV3640_RESET_GPIO, 0);
udelay(100);
omap_set_gpio_dataout(OV3640_RESET_GPIO, 1);
- }
+ } else
+ omap_set_gpio_dataout(OV3640_STANDBY_GPIO, 0);
break;
case V4L2_POWER_OFF:
printk(KERN_DEBUG "ov3640_sensor_power_set(OFF)\n");
@@ -764,6 +765,7 @@ static int ov3640_sensor_power_set(enum
break;
case V4L2_POWER_STANDBY:
printk(KERN_DEBUG "ov3640_sensor_power_set(STANDBY)\n");
+ omap_set_gpio_dataout(OV3640_STANDBY_GPIO, 1);
break;
}
previous_power = power;
reply other threads:[~2009-03-16 0:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200903151920.32085.dcurran@ti.com \
--to=dcurran@ti.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox