public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Add support ov772x driver setting for Migo-R
@ 2008-12-02  7:38 Kuninori Morimoto
  2008-12-03  9:38 ` Paul Mundt
  2008-12-03 10:23 ` morimoto.kuninori
  0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2008-12-02  7:38 UTC (permalink / raw)
  To: linux-sh


Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
this patch is for linux 2.6.29
V4L2 maintainer said ov772x driver will be added to linux 2.6.29

 arch/sh/boards/mach-migor/setup.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 03d2dea..4b348d8 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -20,6 +20,7 @@
 #include <linux/gpio.h>
 #include <media/soc_camera_platform.h>
 #include <media/sh_mobile_ceu.h>
+#include <media/ov772x.h>
 #include <video/sh_mobile_lcdc.h>
 #include <asm/clock.h>
 #include <asm/machvec.h>
@@ -319,6 +320,16 @@ static void camera_power(int mode)
 		camera_power_off();
 }
 
+static int ov7725_power(struct device *dev, int mode)
+{
+	if (mode)
+		camera_power_on();
+	else
+		camera_power_off();
+
+	return 0;
+}
+
 #ifdef CONFIG_I2C
 static unsigned char camera_ov772x_magic[]  {
@@ -441,6 +452,13 @@ static struct platform_device migor_ceu_device = {
 	},
 };
 
+struct ov772x_camera_info ov7725_info = {
+	.buswidth  = SOCAM_DATAWIDTH_8,
+	.link = {
+		.power  = ov7725_power,
+	},
+};
+
 static struct platform_device *migor_devices[] __initdata = {
 	&smc91x_eth_device,
 	&sh_keysc_device,
@@ -461,6 +479,10 @@ static struct i2c_board_info migor_i2c_devices[] = {
 		I2C_BOARD_INFO("migor_ts", 0x51),
 		.irq = 38, /* IRQ6 */
 	},
+	{
+		I2C_BOARD_INFO("ov772x", 0x21),
+		.platform_data = &ov7725_info,
+	},
 };
 
 static int __init migor_devices_setup(void)
-- 
1.5.6.3


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

* Re: [PATCH 1/2] Add support ov772x driver setting for Migo-R
  2008-12-02  7:38 [PATCH 1/2] Add support ov772x driver setting for Migo-R Kuninori Morimoto
@ 2008-12-03  9:38 ` Paul Mundt
  2008-12-03 10:23 ` morimoto.kuninori
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2008-12-03  9:38 UTC (permalink / raw)
  To: linux-sh

On Tue, Dec 02, 2008 at 04:38:34PM +0900, Kuninori Morimoto wrote:
> 
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> ---
> this patch is for linux 2.6.29
> V4L2 maintainer said ov772x driver will be added to linux 2.6.29
> 
As these depend on new headers and data structures, I will include these
with the second round of updates for the merge window, after the V4L2
merge has taken place.

>  arch/sh/boards/mach-migor/setup.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> index 03d2dea..4b348d8 100644
> --- a/arch/sh/boards/mach-migor/setup.c
> +++ b/arch/sh/boards/mach-migor/setup.c
> @@ -441,6 +452,13 @@ static struct platform_device migor_ceu_device = {
>  	},
>  };
>  
> +struct ov772x_camera_info ov7725_info = {
> +	.buswidth  = SOCAM_DATAWIDTH_8,
> +	.link = {
> +		.power  = ov7725_power,
> +	},
> +};
> +
>  static struct platform_device *migor_devices[] __initdata = {
>  	&smc91x_eth_device,
>  	&sh_keysc_device,

Also note that ov7725_info should be static, as you are assigning it to
platform_data and nothing outside of this file is using it otherwise.

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

* Re: [PATCH 1/2] Add support ov772x driver setting for Migo-R
  2008-12-02  7:38 [PATCH 1/2] Add support ov772x driver setting for Migo-R Kuninori Morimoto
  2008-12-03  9:38 ` Paul Mundt
@ 2008-12-03 10:23 ` morimoto.kuninori
  1 sibling, 0 replies; 3+ messages in thread
From: morimoto.kuninori @ 2008-12-03 10:23 UTC (permalink / raw)
  To: linux-sh


Dear Paul

Thank you for checking patch.

> > Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> > ---
> > this patch is for linux 2.6.29
> > V4L2 maintainer said ov772x driver will be added to linux 2.6.29
> > 
> As these depend on new headers and data structures, I will include these
> with the second round of updates for the merge window, after the V4L2
> merge has taken place.

Thank you

> > +struct ov772x_camera_info ov7725_info = {
> > +	.buswidth  = SOCAM_DATAWIDTH_8,
> > +	.link = {
> > +		.power  = ov7725_power,
> > +	},
> > +};
> > +
(snip)
> Also note that ov7725_info should be static, as you are assigning it to
> platform_data and nothing outside of this file is using it otherwise.

ouch !
I will fix it and send again

Thanks.

/Morimoto

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

end of thread, other threads:[~2008-12-03 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02  7:38 [PATCH 1/2] Add support ov772x driver setting for Migo-R Kuninori Morimoto
2008-12-03  9:38 ` Paul Mundt
2008-12-03 10:23 ` morimoto.kuninori

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