public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominic Curran <dcurran@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Subject: [OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor.
Date: Wed, 7 Jan 2009 15:24:11 -0600	[thread overview]
Message-ID: <200901071524.11815.dcurran@ti.com> (raw)

From: Dominic Curran <dcurran@ti.com>
Subject: [OMAPZOOM][PATCH] Set the dcsub value for the OV3640 sensor.

Explicitly set the dcsub (black level subtraction) value for the OV3640 sensor.
For the OV3640 sensor the manufacturer recommends a BLC of 16 (for 10-bit data).
This is a constant value that can be read from the sensors BLC9[3:0] register. 
The reg value (0x4) is for 8-bit data, so for 10-bit data this value should be 
left shifted by 2 (0x10).

Signed-off-by: Dominic Curran <dcurran@ti.com>
---
 arch/arm/mach-omap2/board-3430sdp.c |    1 +
 arch/arm/mach-omap2/board-ldp.c     |    1 +
 drivers/media/video/ov3640.h        |    2 ++
 3 files changed, 4 insertions(+)

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
@@ -756,6 +756,7 @@ static struct isp_interface_config ov364
 	.prev_sph = 2,
 	.prev_slv = 1,
 	.wenlog = ISPCCDC_CFG_WENLOG_AND,
+	.dcsub = OV3640_BLACK_LEVEL_10BIT,
 	.u.csi.crc = 0x0,
 	.u.csi.mode = 0x0,
 	.u.csi.edge = 0x0,
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
@@ -625,6 +625,7 @@ static struct isp_interface_config ov364
 	.prev_sph = 2,
 	.prev_slv = 1,
 	.wenlog = ISPCCDC_CFG_WENLOG_AND,
+	.dcsub = OV3640_BLACK_LEVEL_10BIT,
 	.u.csi.crc = 0x0,
 	.u.csi.mode = 0x0,
 	.u.csi.edge = 0x0,
Index: omapzoom04/drivers/media/video/ov3640.h
===================================================================
--- omapzoom04.orig/drivers/media/video/ov3640.h
+++ omapzoom04/drivers/media/video/ov3640.h
@@ -62,6 +62,8 @@
 #define OV3640_MAX_COLOR		2
 #define OV3640_COLOR_STEP		1
 
+#define OV3640_BLACK_LEVEL_10BIT	16
+
 #define SENSOR_DETECTED		1
 #define SENSOR_NOT_DETECTED	0
 

                 reply	other threads:[~2009-01-07 21:24 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=200901071524.11815.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