Re: [PATCH 5/5] LDP: Add support for built-in camera

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aguirre Rodriguez, Sergio Alberto wrote:
This patch adds support for the LDP builtin camera sensor:
 - Primary sensor (/dev/video4): OV3640 (CSI2).

It introduces also a new file for storing all camera sensors board
specific related functions, like other platforms do (N800 for example).

Signed-off-by: Sergio Aguirre <saaguirre@xxxxxx>
---
 arch/arm/mach-omap2/Makefile                |    3 +-
 arch/arm/mach-omap2/board-ldp-camera.c      |  203 +++++++++++++++++++++++++++
 arch/arm/mach-omap2/board-ldp.c             |   17 +++
 arch/arm/plat-omap/include/mach/board-ldp.h |    1 +
 4 files changed, 223 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-ldp-camera.c

<snip>
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 1e1fd84..513aa8f 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -47,6 +47,13 @@
 #define SDP3430_SMC91X_CS	3
 #define CONFIG_DISABLE_HFCLK 1
+#include <media/v4l2-int-device.h>
+
+#if defined(CONFIG_VIDEO_OV3640) || defined(CONFIG_VIDEO_OV3640_MODULE)
+#include <media/ov3640.h>
+extern struct ov3640_platform_data ldp_ov3640_platform_data;
+#endif
+
 #define ENABLE_VAUX1_DEDICATED	0x03
 #define ENABLE_VAUX1_DEV_GRP	0x20
@@ -496,6 +503,15 @@ static struct i2c_board_info __initdata ldp_i2c_boardinfo[] = {
 	},
 };
+static struct i2c_board_info __initdata ldp_i2c_boardinfo_2[] = {
+#if defined(CONFIG_VIDEO_OV3640) || defined(CONFIG_VIDEO_OV3640_MODULE)
+	{
+		I2C_BOARD_INFO("ov3640", OV3640_I2C_ADDR),
+		.platform_data = &ldp_ov3640_platform_data,
+	},
+#endif
+};
This new added i2c_board_info was not registered.
After I added this line,

omap_register_i2c_bus(2, 400, ldp_i2c_boardinfo_2,
                       ARRAY_SIZE(ldp_i2c_boardinfo_2));

the sensor was found. but the test still failed. A lot of error came out when I run my test program.

<3>CSI2: ComplexIO Error IRQ 80
CSI2: ComplexIO Error IRQ 80
<3>CSI2: ComplexIO Error IRQ c2
CSI2: ComplexIO Error IRQ c2
<3>CSI2: ComplexIO Error IRQ c2
CSI2: ComplexIO Error IRQ c2
<3>CSI2: ComplexIO Error IRQ c6
CSI2: ComplexIO Error IRQ c6
<3>CSI2: ECC correction failed
CSI2: ECC correction failed
<3>CSI2: ComplexIO Error IRQ 6
CSI2: ComplexIO Error IRQ 6
<3>CSI2: ComplexIO Error IRQ 6
CSI2: ComplexIO Error IRQ 6
<3>CSI2: ComplexIO Error IRQ 6
CSI2: ComplexIO Error IRQ 6
<3>CSI2: ComplexIO Error IRQ 6
CSI2: ComplexIO Error IRQ 6


Stanley.
+
 static int __init omap_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 2600, ldp_i2c_boardinfo,
@@ -530,6 +546,7 @@ static void __init omap_ldp_init(void)
 	omap_serial_init();
 	usb_musb_init();
 	twl4030_mmc_init(mmc);
+	ldp_cam_init();
 }
static void __init omap_ldp_map_io(void)
diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h
index f233996..8e5d90b 100644
--- a/arch/arm/plat-omap/include/mach/board-ldp.h
+++ b/arch/arm/plat-omap/include/mach/board-ldp.h
@@ -30,6 +30,7 @@
 #define __ASM_ARCH_OMAP_LDP_H
extern void twl4030_bci_battery_init(void);
+extern void ldp_cam_init(void);
#define TWL4030_IRQNUM INT_34XX_SYS_NIRQ
 #define LDP_SMC911X_CS         1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux