public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] camera: c99 style structure
@ 2005-11-21 14:00 Komal Shah
  0 siblings, 0 replies; 8+ messages in thread
From: Komal Shah @ 2005-11-21 14:00 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

Tony,

I have attached the patch to update the structures in 16xxcam.c and
sensor file to c99 way and fixes compilation of drivers on h3.

Jian,
I am planning to move sensor_powerup/powerdown to board specific file
(here omap16xxcam.c), before start porting camera driver to 24xx, any
suggestions?

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>

---Komal Shah
http://komalshah.blogspot.com/


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

[-- Attachment #2: 2116858835-fix.patch --]
[-- Type: text/plain, Size: 3334 bytes --]

diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c
index 077d2b0..e9e84b1 100644
--- a/drivers/media/video/omap/camera_core.c
+++ b/drivers/media/video/omap/camera_core.c
@@ -32,7 +32,7 @@
 #include <linux/ctype.h>
 #include <linux/pagemap.h>
 #include <linux/mm.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/videodev.h>
diff --git a/drivers/media/video/omap/omap16xxcam.c b/drivers/media/video/omap/omap16xxcam.c
index 6f85bd2..2e90557 100644
--- a/drivers/media/video/omap/omap16xxcam.c
+++ b/drivers/media/video/omap/omap16xxcam.c
@@ -566,18 +566,18 @@ omap16xxcam_init(void)
 }
 
 struct camera_hardware camera_hardware_if = {
-	version		: 0x01, 
-	name		: "OMAP16xx Camera Parallel", 
-	init		: omap16xxcam_init,
-	cleanup		: omap16xxcam_cleanup,
-	open 		: omap16xxcam_open, 
-	close  		: omap16xxcam_close,
-	enable 		: omap16xxcam_enable, 
-	disable  	: omap16xxcam_disable,
-	abort		: omap16xxcam_abort,
-	set_xclk	: omap16xxcam_set_xclk,
-	init_dma	: omap16xxcam_init_dma,
-	start_dma	: omap16xxcam_start_dma,
-	finish_dma	: omap16xxcam_finish_dma,
+	.version	= 0x01, 
+	.name		= "OMAP16xx Camera Parallel", 
+	.init		= omap16xxcam_init,
+	.cleanup	= omap16xxcam_cleanup,
+	.open		= omap16xxcam_open, 
+	.close		= omap16xxcam_close,
+	.enable		= omap16xxcam_enable, 
+	.disable	= omap16xxcam_disable,
+	.abort		= omap16xxcam_abort,
+	.set_xclk	= omap16xxcam_set_xclk,
+	.init_dma	= omap16xxcam_init_dma,
+	.start_dma	= omap16xxcam_start_dma,
+	.finish_dma	= omap16xxcam_finish_dma,
 };
 
diff --git a/drivers/media/video/omap/sensor_ov9640.c b/drivers/media/video/omap/sensor_ov9640.c
index c48f401..9581a64 100644
--- a/drivers/media/video/omap/sensor_ov9640.c
+++ b/drivers/media/video/omap/sensor_ov9640.c
@@ -1152,19 +1152,19 @@ ov9640sensor_init(struct v4l2_pix_format
 }
 
 struct camera_sensor camera_sensor_if = {
-	version: 	0x01,
-	name:		"OV9640",
-	init: 		ov9640sensor_init,
-	cleanup:	ov9640sensor_cleanup, 
-	enum_pixformat:	ov9640sensor_enum_pixformat,
-	try_format:	ov9640sensor_try_format,
-	calc_xclk:	ov9640sensor_calc_xclk,
-	configure:	ov9640sensor_configure,
-	query_control:	ov9640sensor_query_control, 
-	get_control:	ov9640sensor_get_control, 
-	set_control:	ov9640sensor_set_control,
-	power_on:	ov9640sensor_power_on,
-	power_off:	ov9640sensor_power_off,
+	.version	= 0x01,
+	.name		= "OV9640",
+	.init		= ov9640sensor_init,
+	.cleanup	= ov9640sensor_cleanup, 
+	.enum_pixformat = ov9640sensor_enum_pixformat,
+	.try_format	= ov9640sensor_try_format,
+	.calc_xclk	= ov9640sensor_calc_xclk,
+	.configure	= ov9640sensor_configure,
+	.query_control	= ov9640sensor_query_control, 
+	.get_control	= ov9640sensor_get_control, 
+	.set_control	= ov9640sensor_set_control,
+	.power_on	= ov9640sensor_power_on,
+	.power_off	= ov9640sensor_power_off,
 };
 
 void print_ov9640_regs(void *priv)
diff --git a/drivers/net/irda/omap1610-ir.c b/drivers/net/irda/omap1610-ir.c
index 8d503ba..88163b7 100644
--- a/drivers/net/irda/omap1610-ir.c
+++ b/drivers/net/irda/omap1610-ir.c
@@ -54,6 +54,7 @@
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irmod.h>

[-- Attachment #3: Type: text/plain, Size: 184 bytes --]

_______________________________________________
Linux-omap-open-source mailing list
Linux-omap-open-source@linux.omap.com
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH] camera: c99 style structure
@ 2005-11-21 15:19 Zhang, Jian
  2005-11-21 17:52 ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Jian @ 2005-11-21 15:19 UTC (permalink / raw)
  To: Komal Shah, linux-omap-open-source

Komal,

omap16xxcam.c is an OMAP specific file (OMAP1 camera I/F) instead of
board specific file. I like to keep omap16xxcam.c both board and sensor
independent. My suggestion is that moving the board code from the ov9640
sensor driver to board files and calling the board functions from the
sensor. So the sensor interface is intact.

Regards,
Jian 

-----Original Message-----
From: Komal Shah [mailto:komal_shah802003@yahoo.com] 
Sent: Monday, November 21, 2005 8:01 AM
To: linux-omap-open-source@linux.omap.com
Cc: Zhang, Jian
Subject: [PATCH] camera: c99 style structure

Tony,

I have attached the patch to update the structures in 16xxcam.c and
sensor file to c99 way and fixes compilation of drivers on h3.

Jian,
I am planning to move sensor_powerup/powerdown to board specific file
(here omap16xxcam.c), before start porting camera driver to 24xx, any
suggestions?

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>

---Komal Shah
http://komalshah.blogspot.com/


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] camera: c99 style structure
  2005-11-21 15:19 [PATCH] camera: c99 style structure Zhang, Jian
@ 2005-11-21 17:52 ` Tony Lindgren
  2005-11-22  8:50   ` Komal Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2005-11-21 17:52 UTC (permalink / raw)
  To: Zhang, Jian; +Cc: linux-omap-open-source

* Zhang, Jian <jzhang@ti.com> [051121 07:20]:
> Komal,
> 
> omap16xxcam.c is an OMAP specific file (OMAP1 camera I/F) instead of
> board specific file. I like to keep omap16xxcam.c both board and sensor
> independent. My suggestion is that moving the board code from the ov9640
> sensor driver to board files and calling the board functions from the
> sensor. So the sensor interface is intact.

I like this too.
 
> From: Komal Shah [mailto:komal_shah802003@yahoo.com] 
> 
> I have attached the patch to update the structures in 16xxcam.c and
> sensor file to c99 way and fixes compilation of drivers on h3.

I'll push this one today.

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] camera: c99 style structure
  2005-11-21 17:52 ` Tony Lindgren
@ 2005-11-22  8:50   ` Komal Shah
  0 siblings, 0 replies; 8+ messages in thread
From: Komal Shah @ 2005-11-22  8:50 UTC (permalink / raw)
  To: Tony Lindgren, Zhang, Jian; +Cc: linux-omap-open-source

--- Tony Lindgren <tony@atomide.com> wrote:

> * Zhang, Jian <jzhang@ti.com> [051121 07:20]:
> > Komal,
> > 
> > omap16xxcam.c is an OMAP specific file (OMAP1 camera I/F) instead
> of
> > board specific file. I like to keep omap16xxcam.c both board and
> sensor
> > independent. My suggestion is that moving the board code from the
> ov9640
> > sensor driver to board files and calling the board functions from
> the
> > sensor. So the sensor interface is intact.
> 
> I like this too.

Yes, but which board file is again a confusion. I don't think
board-hx.c is a good candidate for exporting functions from that. How
about gpio-expandar-omap.c itself? _or_ should we create a new file
under mach-omap1/2 to export this two powerup/down symbols?

---Komal Shah
http://komalshah.blogspot.com/


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] camera: c99 style structure
@ 2005-11-22 14:44 Zhang, Jian
  2005-11-23  5:39 ` Komal Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Jian @ 2005-11-22 14:44 UTC (permalink / raw)
  To: Komal Shah, Tony Lindgren; +Cc: linux-omap-open-source

I think it is as simple as a bunch of board files in the same directory
(drivers/media/video/omap2420). They don't need to go to arch/arm/mach/
directory. I believe OMAP1 frame buffer driver takes this approach.

Regards,
Jian 

-----Original Message-----
From: Komal Shah [mailto:komal_shah802003@yahoo.com] 
Sent: Tuesday, November 22, 2005 2:50 AM
To: Tony Lindgren; Zhang, Jian
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] camera: c99 style structure

--- Tony Lindgren <tony@atomide.com> wrote:

> * Zhang, Jian <jzhang@ti.com> [051121 07:20]:
> > Komal,
> > 
> > omap16xxcam.c is an OMAP specific file (OMAP1 camera I/F) instead
> of
> > board specific file. I like to keep omap16xxcam.c both board and
> sensor
> > independent. My suggestion is that moving the board code from the
> ov9640
> > sensor driver to board files and calling the board functions from
> the
> > sensor. So the sensor interface is intact.
> 
> I like this too.

Yes, but which board file is again a confusion. I don't think
board-hx.c is a good candidate for exporting functions from that. How
about gpio-expandar-omap.c itself? _or_ should we create a new file
under mach-omap1/2 to export this two powerup/down symbols?

---Komal Shah
http://komalshah.blogspot.com/


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] camera: c99 style structure
  2005-11-22 14:44 Zhang, Jian
@ 2005-11-23  5:39 ` Komal Shah
  0 siblings, 0 replies; 8+ messages in thread
From: Komal Shah @ 2005-11-23  5:39 UTC (permalink / raw)
  To: Zhang, Jian, Tony Lindgren; +Cc: linux-omap-open-source


--- "Zhang, Jian" <jzhang@ti.com> wrote:

> I think it is as simple as a bunch of board files in the same
> directory
> (drivers/media/video/omap2420). They don't need to go to
> arch/arm/mach/
> directory. I believe OMAP1 frame buffer driver takes this
> approach.

No, Imre has added OMAP2 fb support without creating new omap2
directory under drivers/video directory. But I was thinking to create
files under drivers/media/video/omap directory like
sensor_power_h2/h4/<custom board name> to export powerup/down function
related to sensors based on board interface.

Also while porting omap24xx camera interface, I want to keep the same
camera_core and sensor interface as you had suggested earlier.

---Komal Shah
http://komalshah.blogspot.com/


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] camera: c99 style structure
@ 2005-11-23 15:36 Zhang, Jian
  2005-11-24 10:47 ` Komal Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Jian @ 2005-11-23 15:36 UTC (permalink / raw)
  To: Komal Shah, Tony Lindgren; +Cc: linux-omap-open-source

" But I was thinking to create
files under drivers/media/video/omap directory like
sensor_power_h2/h4/<custom board name> to export powerup/down function
related to sensors based on board interface."

Yes, this is what I meant.

Porting OMAP2 driver to camera_core is not straightforward. We are
developing a new sensor driver for TI/Micron camera which has sensor
context A and B. This will require the change to omap24xxcam.c. If you
want to spend time in unifying OMAP1 and OMAP2 camera drivers, I suggest
you wait until my change to omap24xxcam.c is done.

Regards,
Jian  

-----Original Message-----
From: Komal Shah [mailto:komal_shah802003@yahoo.com] 
Sent: Tuesday, November 22, 2005 11:40 PM
To: Zhang, Jian; Tony Lindgren
Cc: linux-omap-open-source@linux.omap.com
Subject: RE: [PATCH] camera: c99 style structure


--- "Zhang, Jian" <jzhang@ti.com> wrote:

> I think it is as simple as a bunch of board files in the same
> directory
> (drivers/media/video/omap2420). They don't need to go to
> arch/arm/mach/
> directory. I believe OMAP1 frame buffer driver takes this
> approach.

No, Imre has added OMAP2 fb support without creating new omap2
directory under drivers/video directory. But I was thinking to create
files under drivers/media/video/omap directory like
sensor_power_h2/h4/<custom board name> to export powerup/down function
related to sensors based on board interface.

Also while porting omap24xx camera interface, I want to keep the same
camera_core and sensor interface as you had suggested earlier.

---Komal Shah
http://komalshah.blogspot.com/


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] camera: c99 style structure
  2005-11-23 15:36 Zhang, Jian
@ 2005-11-24 10:47 ` Komal Shah
  0 siblings, 0 replies; 8+ messages in thread
From: Komal Shah @ 2005-11-24 10:47 UTC (permalink / raw)
  To: Zhang, Jian, Tony Lindgren; +Cc: linux-omap-open-source

--- "Zhang, Jian" <jzhang@ti.com> wrote:

> " But I was thinking to create
> files under drivers/media/video/omap directory like
> sensor_power_h2/h4/<custom board name> to export powerup/down
> function
> related to sensors based on board interface."
> 
> Yes, this is what I meant.

Thanx. I will submit the patch for that then.

> 
> Porting OMAP2 driver to camera_core is not straightforward. We are
> developing a new sensor driver for TI/Micron camera which has sensor
> context A and B. This will require the change to omap24xxcam.c. If
> you
> want to spend time in unifying OMAP1 and OMAP2 camera drivers, I
> suggest
> you wait until my change to omap24xxcam.c is done.
> 

Ok, I can wait. As I said earlier, I am having custom made Micron
MT9M011 camera module which can interface with H4 EVM and Blackfin. I
have already tested I2C communication interface with H4 and with
Blackfin I was able to capture with default settings. 

Which Micron sensor you are using? I know about context A and B stuff
for Micron.

Meanwhile I can add video out interface with OMAP2 instead. I have put
Imre and Juha in the CC, as Imre already added very good code for FB
and might have some inputs on utilizing command dispc related functions
in vid out framework.

---Komal Shah
http://komalshah.blogspot.com/


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-24 10:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21 15:19 [PATCH] camera: c99 style structure Zhang, Jian
2005-11-21 17:52 ` Tony Lindgren
2005-11-22  8:50   ` Komal Shah
  -- strict thread matches above, loose matches on Subject: below --
2005-11-23 15:36 Zhang, Jian
2005-11-24 10:47 ` Komal Shah
2005-11-22 14:44 Zhang, Jian
2005-11-23  5:39 ` Komal Shah
2005-11-21 14:00 Komal Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox