Re: [PATCH V3] Add camera (CSI) driver for MX1

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

 



Guennadi Liakhovetski wrote:
Ok, we're almost there:-) Should be the last iteration.

On Fri, 3 Apr 2009, Darius Augulis wrote:

From: Paulius Zaleckas <paulius.zaleckas@xxxxxxxxxxxx>

Changelog since V2:
- My signed-off line added
- Makefile updated
- .init and .exit removed from pdata
- includes sorted
- Video memory limit added
- Pointers in free_buffer() fixed
- Indentation fixed
- Spinlocks added
- PM implementation removed
- Added missed clk_put()
- pdata test added
- CSI device renamed
- Platform flags fixed
- "i.MX" replaced by "MX1" in debug prints

I usually put such changelogs below the "---" line, so it doesn't appear in the git commit message, and here you just put a short description of the patch.

Signed-off-by: Darius Augulis <augulis.darius@xxxxxxxxx>
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@xxxxxxxxxxxx>
---

[snip]

diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h
index e0783e6..7113b3e 100644
--- a/arch/arm/plat-mxc/include/mach/memory.h
+++ b/arch/arm/plat-mxc/include/mach/memory.h
@@ -24,4 +24,12 @@
 #define PHYS_OFFSET		UL(0x80000000)
 #endif
+#if defined(CONFIG_MX1_VIDEO)

This #ifdef is not needed any more now, the file is not compiled if CONFIG_MX1_VIDEO is not defined.
this header file is included by arch/arm/include/asm/memory.h
By default dma bufer size is only 2Mbytes. If we remove this ifdef, this bufer will be increased to re-defined size.
Therefore I suggest to leave this ifdef.

+	/* Make choises, based on platform choice */
+	if ((common_flags & SOCAM_VSYNC_ACTIVE_HIGH) &&
+		(common_flags & SOCAM_VSYNC_ACTIVE_LOW)) {
+			if (pcdev->pdata->flags & MX1_CAMERA_VSYNC_HIGH)
+				common_flags &= ~SOCAM_VSYNC_ACTIVE_LOW;
+			else
+				common_flags &= ~SOCAM_VSYNC_ACTIVE_HIGH;
+	}
+
+	if ((common_flags & SOCAM_PCLK_SAMPLE_RISING) &&
+		(common_flags & SOCAM_PCLK_SAMPLE_FALLING)) {
+			if (pcdev->pdata->flags & MX1_CAMERA_PCLK_RISING)
+				common_flags &= ~SOCAM_PCLK_SAMPLE_FALLING;
+			else
+				common_flags &= ~SOCAM_PCLK_SAMPLE_RISING;
+	}
+
+	if ((common_flags & SOCAM_DATA_ACTIVE_HIGH) &&
+		(common_flags & SOCAM_DATA_ACTIVE_LOW)) {
+			if (pcdev->pdata->flags & MX1_CAMERA_DATA_HIGH)
+				common_flags &= ~SOCAM_DATA_ACTIVE_LOW;
+			else
+				common_flags &= ~SOCAM_DATA_ACTIVE_HIGH;
+	}

In all three clauses above pdata can be NULL.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer


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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux