* [PATCH 2/2] Add support ov772x driver setting to ap325
@ 2009-01-22 0:38 Kuninori Morimoto
2009-02-19 1:53 ` Nobuhiro Iwamatsu
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Kuninori Morimoto @ 2009-01-22 0:38 UTC (permalink / raw)
To: linux-sh
This patch add ov772x camera settings to ap325,
Old camera is still supported. And it will be 2nd camera
if you select ov772x and soc_camera_platform in same time.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
arch/sh/boards/board-ap325rxa.c | 53 ++++++++++++++++++++++++++++++++++++--
1 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 72da416..7c35787 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -22,6 +22,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
+#include <media/ov772x.h>
#include <media/soc_camera_platform.h>
#include <media/sh_mobile_ceu.h>
#include <video/sh_mobile_lcdc.h>
@@ -223,6 +224,7 @@ static void camera_power(int val)
}
#ifdef CONFIG_I2C
+/* support for the old ncm03j camera */
static unsigned char camera_ncm03j_magic[] {
0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8,
@@ -243,6 +245,23 @@ static unsigned char camera_ncm03j_magic[] 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F,
};
+static int camera_probe(void)
+{
+ struct i2c_adapter *a = i2c_get_adapter(0);
+ struct i2c_msg msg;
+ int ret;
+
+ camera_power(1);
+ msg.addr = 0x6e;
+ msg.buf = camera_ncm03j_magic;
+ msg.len = 2;
+ msg.flags = 0;
+ ret = i2c_transfer(a, &msg, 1);
+ camera_power(0);
+
+ return ret;
+}
+
static int camera_set_capture(struct soc_camera_platform_info *info,
int enable)
{
@@ -294,8 +313,35 @@ static struct platform_device camera_device = {
.platform_data = &camera_info,
},
};
+
+static int __init camera_setup(void)
+{
+ if (camera_probe() > 0)
+ platform_device_register(&camera_device);
+
+ return 0;
+}
+late_initcall(camera_setup);
+
#endif /* CONFIG_I2C */
+static int ov7725_power(struct device *dev, int mode)
+{
+ camera_power(0);
+ if (mode)
+ camera_power(1);
+
+ return 0;
+}
+
+static struct ov772x_camera_info ov7725_info = {
+ .buswidth = SOCAM_DATAWIDTH_8,
+ .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
+ .link = {
+ .power = ov7725_power,
+ },
+};
+
static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
.flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
@@ -346,9 +392,6 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
&ap325rxa_nor_flash_device,
&lcdc_device,
&ceu_device,
-#ifdef CONFIG_I2C
- &camera_device,
-#endif
&nand_flash_device,
&sdcard_cn3_device,
};
@@ -357,6 +400,10 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
{
I2C_BOARD_INFO("pcf8563", 0x51),
},
+ {
+ I2C_BOARD_INFO("ov772x", 0x21),
+ .platform_data = &ov7725_info,
+ },
};
static struct spi_board_info ap325rxa_spi_devices[] = {
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
@ 2009-02-19 1:53 ` Nobuhiro Iwamatsu
2009-02-20 2:33 ` morimoto.kuninori
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nobuhiro Iwamatsu @ 2009-02-19 1:53 UTC (permalink / raw)
To: linux-sh
Hi Paul.
Please exclude this commit from sh/for-2.6.29.
Because patces for media/ov772x.h is not yet taken in in 2.6.29-rcX,
compiling it fails.
http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/594
Best regards,
Nobuhiro
2009/1/22 Kuninori Morimoto <morimoto.kuninori@renesas.com>:
> This patch add ov772x camera settings to ap325,
> Old camera is still supported. And it will be 2nd camera
> if you select ov772x and soc_camera_platform in same time.
>
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
> ---
> arch/sh/boards/board-ap325rxa.c | 53 ++++++++++++++++++++++++++++++++++++--
> 1 files changed, 50 insertions(+), 3 deletions(-)
>
> diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
> index 72da416..7c35787 100644
> --- a/arch/sh/boards/board-ap325rxa.c
> +++ b/arch/sh/boards/board-ap325rxa.c
> @@ -22,6 +22,7 @@
> #include <linux/gpio.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/spi_gpio.h>
> +#include <media/ov772x.h>
> #include <media/soc_camera_platform.h>
> #include <media/sh_mobile_ceu.h>
> #include <video/sh_mobile_lcdc.h>
> @@ -223,6 +224,7 @@ static void camera_power(int val)
> }
>
> #ifdef CONFIG_I2C
> +/* support for the old ncm03j camera */
> static unsigned char camera_ncm03j_magic[] > {
> 0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8,
> @@ -243,6 +245,23 @@ static unsigned char camera_ncm03j_magic[] > 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F,
> };
>
> +static int camera_probe(void)
> +{
> + struct i2c_adapter *a = i2c_get_adapter(0);
> + struct i2c_msg msg;
> + int ret;
> +
> + camera_power(1);
> + msg.addr = 0x6e;
> + msg.buf = camera_ncm03j_magic;
> + msg.len = 2;
> + msg.flags = 0;
> + ret = i2c_transfer(a, &msg, 1);
> + camera_power(0);
> +
> + return ret;
> +}
> +
> static int camera_set_capture(struct soc_camera_platform_info *info,
> int enable)
> {
> @@ -294,8 +313,35 @@ static struct platform_device camera_device = {
> .platform_data = &camera_info,
> },
> };
> +
> +static int __init camera_setup(void)
> +{
> + if (camera_probe() > 0)
> + platform_device_register(&camera_device);
> +
> + return 0;
> +}
> +late_initcall(camera_setup);
> +
> #endif /* CONFIG_I2C */
>
> +static int ov7725_power(struct device *dev, int mode)
> +{
> + camera_power(0);
> + if (mode)
> + camera_power(1);
> +
> + return 0;
> +}
> +
> +static struct ov772x_camera_info ov7725_info = {
> + .buswidth = SOCAM_DATAWIDTH_8,
> + .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
> + .link = {
> + .power = ov7725_power,
> + },
> +};
> +
> static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> .flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
> SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
> @@ -346,9 +392,6 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
> &ap325rxa_nor_flash_device,
> &lcdc_device,
> &ceu_device,
> -#ifdef CONFIG_I2C
> - &camera_device,
> -#endif
> &nand_flash_device,
> &sdcard_cn3_device,
> };
> @@ -357,6 +400,10 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
> {
> I2C_BOARD_INFO("pcf8563", 0x51),
> },
> + {
> + I2C_BOARD_INFO("ov772x", 0x21),
> + .platform_data = &ov7725_info,
> + },
> };
>
> static struct spi_board_info ap325rxa_spi_devices[] = {
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Nobuhiro Iwamatsu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
2009-02-19 1:53 ` Nobuhiro Iwamatsu
@ 2009-02-20 2:33 ` morimoto.kuninori
2009-02-27 6:33 ` Paul Mundt
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: morimoto.kuninori @ 2009-02-20 2:33 UTC (permalink / raw)
To: linux-sh
Dear Iwamatsu-san
> Please exclude this commit from sh/for-2.6.29.
> Because patces for media/ov772x.h is not yet taken in in 2.6.29-rcX,
> compiling it fails.
>
> http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/594
I'm so sorry.
Yesterday, soc_camera maintainer (Guennadi) sent pull request to Mauro.
ap325 needs [07/14: ov772x: Add image flip support].
http://www.mail-archive.com/linux-media@vger.kernel.org/msg01778.html
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
2009-02-19 1:53 ` Nobuhiro Iwamatsu
2009-02-20 2:33 ` morimoto.kuninori
@ 2009-02-27 6:33 ` Paul Mundt
2009-03-02 0:24 ` morimoto.kuninori
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Paul Mundt @ 2009-02-27 6:33 UTC (permalink / raw)
To: linux-sh
On Fri, Feb 20, 2009 at 11:33:18AM +0900, morimoto.kuninori@renesas.com wrote:
>
> Dear Iwamatsu-san
>
> > Please exclude this commit from sh/for-2.6.29.
> > Because patces for media/ov772x.h is not yet taken in in 2.6.29-rcX,
> > compiling it fails.
> >
> > http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/594
>
> I'm so sorry.
> Yesterday, soc_camera maintainer (Guennadi) sent pull request to Mauro.
> ap325 needs [07/14: ov772x: Add image flip support].
>
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg01778.html
>
I've reverted it in the 2.6.29 tree, but it is still there for 2.6.30,
which should now be settled in -next.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
` (2 preceding siblings ...)
2009-02-27 6:33 ` Paul Mundt
@ 2009-03-02 0:24 ` morimoto.kuninori
2009-03-30 23:05 ` Paul Mundt
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: morimoto.kuninori @ 2009-03-02 0:24 UTC (permalink / raw)
To: linux-sh
Dear Paul
> > > Please exclude this commit from sh/for-2.6.29.
> > > Because patces for media/ov772x.h is not yet taken in in 2.6.29-rcX,
> > > compiling it fails.
(snip)
> I've reverted it in the 2.6.29 tree, but it is still there for 2.6.30,
> which should now be settled in -next.
Sorry. Please remove this patch from -next.
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
` (3 preceding siblings ...)
2009-03-02 0:24 ` morimoto.kuninori
@ 2009-03-30 23:05 ` Paul Mundt
2009-03-31 5:33 ` Paul Mundt
2009-03-31 5:34 ` morimoto.kuninori
6 siblings, 0 replies; 8+ messages in thread
From: Paul Mundt @ 2009-03-30 23:05 UTC (permalink / raw)
To: linux-sh
On Thu, Jan 22, 2009 at 09:38:31AM +0900, Kuninori Morimoto wrote:
> This patch add ov772x camera settings to ap325,
> Old camera is still supported. And it will be 2nd camera
> if you select ov772x and soc_camera_platform in same time.
>
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
This is now re-added to the queue, as the V4L merge has taken place now.
Please make sure everything works as it is supposed to.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
` (4 preceding siblings ...)
2009-03-30 23:05 ` Paul Mundt
@ 2009-03-31 5:33 ` Paul Mundt
2009-03-31 5:34 ` morimoto.kuninori
6 siblings, 0 replies; 8+ messages in thread
From: Paul Mundt @ 2009-03-31 5:33 UTC (permalink / raw)
To: linux-sh
On Tue, Mar 31, 2009 at 02:34:21PM +0900, morimoto.kuninori@renesas.com wrote:
>
> Dear Paul
>
> > > This patch add ov772x camera settings to ap325,
> > > Old camera is still supported. And it will be 2nd camera
> > > if you select ov772x and soc_camera_platform in same time.
> > >
> > > Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> > > Signed-off-by: Magnus Damm <damm@igel.co.jp>
> >
> > This is now re-added to the queue, as the V4L merge has taken place now.
> > Please make sure everything works as it is supposed to.
>
> Thank you
>
> But please apply folloing patch also.
>
> 2009/03/11
> [PATCH] sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
>
Applied also, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Add support ov772x driver setting to ap325
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
` (5 preceding siblings ...)
2009-03-31 5:33 ` Paul Mundt
@ 2009-03-31 5:34 ` morimoto.kuninori
6 siblings, 0 replies; 8+ messages in thread
From: morimoto.kuninori @ 2009-03-31 5:34 UTC (permalink / raw)
To: linux-sh
Dear Paul
> > This patch add ov772x camera settings to ap325,
> > Old camera is still supported. And it will be 2nd camera
> > if you select ov772x and soc_camera_platform in same time.
> >
> > Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> > Signed-off-by: Magnus Damm <damm@igel.co.jp>
>
> This is now re-added to the queue, as the V4L merge has taken place now.
> Please make sure everything works as it is supposed to.
Thank you
But please apply folloing patch also.
2009/03/11
[PATCH] sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-03-31 5:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 0:38 [PATCH 2/2] Add support ov772x driver setting to ap325 Kuninori Morimoto
2009-02-19 1:53 ` Nobuhiro Iwamatsu
2009-02-20 2:33 ` morimoto.kuninori
2009-02-27 6:33 ` Paul Mundt
2009-03-02 0:24 ` morimoto.kuninori
2009-03-30 23:05 ` Paul Mundt
2009-03-31 5:33 ` Paul Mundt
2009-03-31 5:34 ` morimoto.kuninori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox