linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [OMAPZOOM][PATCH] OV3640: Make camera sensor goto standby.
@ 2009-03-16  0:20 Dominic Curran
  0 siblings, 0 replies; only message in thread
From: Dominic Curran @ 2009-03-16  0:20 UTC (permalink / raw)
  To: linux-omap

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-16  0:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-16  0:20 [OMAPZOOM][PATCH] OV3640: Make camera sensor goto standby Dominic Curran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).