mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sh/boards/mach-migor/setup.c build error
@ 2008-10-14 18:39 Adrian Bunk
  2008-10-14 21:53 ` [PATCH] soc-camera: fix compile breakage on SH Guennadi Liakhovetski
  0 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2008-10-14 18:39 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier, Guennadi Liakhovetski,
	Mauro Carvalho Chehab, lethal
  Cc: linux-sh, video4linux-list, linux-kernel, Magnus Damm

Commit 81034663159f39d005316b5c139038459cd16721
(V4L/DVB (8687): soc-camera: Move .power and .reset from
 soc_camera host to sensor driver) causes the following build error:

<--  snip  -->

...
  CC      arch/sh/boards/mach-migor/setup.o
arch/sh/boards/mach-migor/setup.c:408: error: unknown field 'enable_camera' specified in initializer
arch/sh/boards/mach-migor/setup.c:408: warning: excess elements in struct initializer
arch/sh/boards/mach-migor/setup.c:408: warning: (near initialization for 'sh_mobile_ceu_info')
arch/sh/boards/mach-migor/setup.c:409: error: unknown field 'disable_camera' specified in initializer
arch/sh/boards/mach-migor/setup.c:409: warning: excess elements in struct initializer
arch/sh/boards/mach-migor/setup.c:409: warning: (near initialization for 'sh_mobile_ceu_info')
make[2]: *** [arch/sh/boards/mach-migor/setup.o] Error 1

<--  snip  -->


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* [PATCH] soc-camera: fix compile breakage on SH
  2008-10-14 18:39 sh/boards/mach-migor/setup.c build error Adrian Bunk
@ 2008-10-14 21:53 ` Guennadi Liakhovetski
  2008-10-15  3:33   ` Adrian Bunk
  0 siblings, 1 reply; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-14 21:53 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Stefan Herbrechtsmeier, Mauro Carvalho Chehab, lethal, linux-sh,
	video4linux-list, linux-kernel, Magnus Damm

Fix Migo-R compile breakage caused by incomplete merge.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

---

Hi Adrian,

please see, if the patch below fixes it. Completely untested. Magnus, 
could you please verify if it also works (of course, if it at least 
compiles:-)) If it doesn't, please fix it along these lines, if it suits 
your needs.

On Tue, 14 Oct 2008, Adrian Bunk wrote:

> Commit 81034663159f39d005316b5c139038459cd16721
> (V4L/DVB (8687): soc-camera: Move .power and .reset from
>  soc_camera host to sensor driver) causes the following build error:
> 
> <--  snip  -->
> 
> ...
>   CC      arch/sh/boards/mach-migor/setup.o
> arch/sh/boards/mach-migor/setup.c:408: error: unknown field 'enable_camera' specified in initializer
> arch/sh/boards/mach-migor/setup.c:408: warning: excess elements in struct initializer
> arch/sh/boards/mach-migor/setup.c:408: warning: (near initialization for 'sh_mobile_ceu_info')
> arch/sh/boards/mach-migor/setup.c:409: error: unknown field 'disable_camera' specified in initializer
> arch/sh/boards/mach-migor/setup.c:409: warning: excess elements in struct initializer
> arch/sh/boards/mach-migor/setup.c:409: warning: (near initialization for 'sh_mobile_ceu_info')
> make[2]: *** [arch/sh/boards/mach-migor/setup.o] Error 1
> 
> <--  snip  -->


diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 714dce9..95459f3 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -312,6 +312,14 @@ static void camera_power_off(void)
 	ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
 }
 
+static void camera_power(int mode)
+{
+	if (mode)
+		camera_power_on();
+	else
+		camera_power_off();
+}
+
 #ifdef CONFIG_I2C
 static unsigned char camera_ov772x_magic[] =
 {
@@ -391,6 +399,7 @@ static struct soc_camera_platform_info ov772x_info = {
 	},
 	.bus_param =  SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
 	SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
+	.power = camera_power,
 	.set_capture = ov772x_set_capture,
 };
 
@@ -405,8 +414,6 @@ static struct platform_device migor_camera_device = {
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
 	| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
-	.enable_camera = camera_power_on,
-	.disable_camera = camera_power_off,
 };
 
 static struct resource migor_ceu_resources[] = {
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
index 1adc257..5b08873 100644
--- a/drivers/media/video/soc_camera_platform.c
+++ b/drivers/media/video/soc_camera_platform.c
@@ -44,11 +44,21 @@ soc_camera_platform_get_info(struct soc_camera_device *icd)
 
 static int soc_camera_platform_init(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(1);
+
 	return 0;
 }
 
 static int soc_camera_platform_release(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(0);
+
 	return 0;
 }
 
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 851f182..7c81ad3 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -9,6 +9,7 @@ struct soc_camera_platform_info {
 	unsigned long format_depth;
 	struct v4l2_pix_format format;
 	unsigned long bus_param;
+	void (*power)(int);
 	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
 };
 

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-14 21:53 ` [PATCH] soc-camera: fix compile breakage on SH Guennadi Liakhovetski
@ 2008-10-15  3:33   ` Adrian Bunk
  2008-10-15  5:20     ` Adrian Bunk
  0 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2008-10-15  3:33 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Stefan Herbrechtsmeier, Mauro Carvalho Chehab, lethal, linux-sh,
	video4linux-list, linux-kernel, Magnus Damm

On Tue, Oct 14, 2008 at 11:53:37PM +0200, Guennadi Liakhovetski wrote:
> Fix Migo-R compile breakage caused by incomplete merge.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> ---
> 
> Hi Adrian,

Hi Guennadi,

> please see, if the patch below fixes it. Completely untested. Magnus, 
> could you please verify if it also works (of course, if it at least 
> compiles:-)) If it doesn't, please fix it along these lines, if it suits 
> your needs.
>...

it does compile.

I cannot verify whether it also works.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  3:33   ` Adrian Bunk
@ 2008-10-15  5:20     ` Adrian Bunk
  2008-10-15  6:28       ` Magnus Damm
  0 siblings, 1 reply; 12+ messages in thread
From: Adrian Bunk @ 2008-10-15  5:20 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Stefan Herbrechtsmeier, Mauro Carvalho Chehab, lethal, linux-sh,
	video4linux-list, linux-kernel, Magnus Damm

On Wed, Oct 15, 2008 at 06:33:03AM +0300, Adrian Bunk wrote:
> On Tue, Oct 14, 2008 at 11:53:37PM +0200, Guennadi Liakhovetski wrote:
> > Fix Migo-R compile breakage caused by incomplete merge.
> > 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > 
> > ---
> > 
> > Hi Adrian,
> 
> Hi Guennadi,
> 
> > please see, if the patch below fixes it. Completely untested. Magnus, 
> > could you please verify if it also works (of course, if it at least 
> > compiles:-)) If it doesn't, please fix it along these lines, if it suits 
> > your needs.
> >...
> 
> it does compile.
>...

But it causes compile breakage elsewhere:

<--  snip  -->

...
  CC      drivers/media/video/soc_camera_platform.o
drivers/media/video/soc_camera_platform.c: In function ‘soc_camera_platform_init’:
drivers/media/video/soc_camera_platform.c:49: error: ‘struct soc_camera_platform_info’ has no member named ‘power’
drivers/media/video/soc_camera_platform.c:50: error: ‘struct soc_camera_platform_info’ has no member named ‘power’
drivers/media/video/soc_camera_platform.c: In function ‘soc_camera_platform_release’:
drivers/media/video/soc_camera_platform.c:59: error: ‘struct soc_camera_platform_info’ has no member named ‘power’
drivers/media/video/soc_camera_platform.c:60: error: ‘struct soc_camera_platform_info’ has no member named ‘power’
make[4]: *** [drivers/media/video/soc_camera_platform.o] Error 1

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  5:20     ` Adrian Bunk
@ 2008-10-15  6:28       ` Magnus Damm
  2008-10-15  6:41         ` Guennadi Liakhovetski
  0 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2008-10-15  6:28 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Guennadi Liakhovetski, Stefan Herbrechtsmeier,
	Mauro Carvalho Chehab, lethal, linux-sh, video4linux-list,
	linux-kernel, Magnus Damm

On Wed, Oct 15, 2008 at 2:20 PM, Adrian Bunk <bunk@kernel.org> wrote:
> On Wed, Oct 15, 2008 at 06:33:03AM +0300, Adrian Bunk wrote:
>> On Tue, Oct 14, 2008 at 11:53:37PM +0200, Guennadi Liakhovetski wrote:
>> > Fix Migo-R compile breakage caused by incomplete merge.
>> >
>> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> >
>> > ---
>> >
>> > Hi Adrian,
>>
>> Hi Guennadi,
>>
>> > please see, if the patch below fixes it. Completely untested. Magnus,
>> > could you please verify if it also works (of course, if it at least
>> > compiles:-)) If it doesn't, please fix it along these lines, if it suits
>> > your needs.
>> >...
>>
>> it does compile.
>>...
>
> But it causes compile breakage elsewhere:
>
> <--  snip  -->

Hi guys,

Thanks for working on fixing the breakage. I'd prefer to wait a bit
since there are quite a few pinmux patches queued up that may break if
we merge a fix right now. I can fix it up later on.

Thanks,

/ magnus

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  6:28       ` Magnus Damm
@ 2008-10-15  6:41         ` Guennadi Liakhovetski
  2008-10-15  8:03           ` Magnus Damm
  0 siblings, 1 reply; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-15  6:41 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel, Magnus Damm

Hi Magnus

On Wed, 15 Oct 2008, Magnus Damm wrote:

> Thanks for working on fixing the breakage. I'd prefer to wait a bit
> since there are quite a few pinmux patches queued up that may break if
> we merge a fix right now. I can fix it up later on.

no, I would not leave the kernel in a non-compilable state even if just 
for one board. Please, test a new version of the patch below. And yes, You 
will have to rebase your patches, sorry. Another thing, could you also, 
please, add a license / copyright header to 
include/media/soc_camera_platform.h?

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

From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: [PATCH v2] soc-camera: fix compile breakage on SH

Fix Migo-R compile breakage caused by incomplete merge. Also remove 
redundant soc_camera_platform_info struct definition from 
drivers/media/video/soc_camera_platform.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

---

diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 714dce9..95459f3 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -312,6 +312,14 @@ static void camera_power_off(void)
 	ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
 }
 
+static void camera_power(int mode)
+{
+	if (mode)
+		camera_power_on();
+	else
+		camera_power_off();
+}
+
 #ifdef CONFIG_I2C
 static unsigned char camera_ov772x_magic[] =
 {
@@ -391,6 +399,7 @@ static struct soc_camera_platform_info ov772x_info = {
 	},
 	.bus_param =  SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
 	SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
+	.power = camera_power,
 	.set_capture = ov772x_set_capture,
 };
 
@@ -405,8 +414,6 @@ static struct platform_device migor_camera_device = {
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
 	| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
-	.enable_camera = camera_power_on,
-	.disable_camera = camera_power_off,
 };
 
 static struct resource migor_ceu_resources[] = {
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
index 1adc257..bb7a9d4 100644
--- a/drivers/media/video/soc_camera_platform.c
+++ b/drivers/media/video/soc_camera_platform.c
@@ -18,15 +18,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-common.h>
 #include <media/soc_camera.h>
-
-struct soc_camera_platform_info {
-	int iface;
-	char *format_name;
-	unsigned long format_depth;
-	struct v4l2_pix_format format;
-	unsigned long bus_param;
-	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
-};
+#include <media/soc_camera_platform.h>
 
 struct soc_camera_platform_priv {
 	struct soc_camera_platform_info *info;
@@ -44,11 +36,21 @@ soc_camera_platform_get_info(struct soc_camera_device *icd)
 
 static int soc_camera_platform_init(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(1);
+
 	return 0;
 }
 
 static int soc_camera_platform_release(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(0);
+
 	return 0;
 }
 
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 851f182..7c81ad3 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -9,6 +9,7 @@ struct soc_camera_platform_info {
 	unsigned long format_depth;
 	struct v4l2_pix_format format;
 	unsigned long bus_param;
+	void (*power)(int);
 	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
 };
 

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  6:41         ` Guennadi Liakhovetski
@ 2008-10-15  8:03           ` Magnus Damm
  2008-10-15  8:26             ` Guennadi Liakhovetski
  0 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2008-10-15  8:03 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel, Magnus Damm

Hi Guennadi,

On Wed, Oct 15, 2008 at 3:41 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> Hi Magnus
>
> On Wed, 15 Oct 2008, Magnus Damm wrote:
>
>> Thanks for working on fixing the breakage. I'd prefer to wait a bit
>> since there are quite a few pinmux patches queued up that may break if
>> we merge a fix right now. I can fix it up later on.
>
> no, I would not leave the kernel in a non-compilable state even if just
> for one board. Please, test a new version of the patch below. And yes, You
> will have to rebase your patches, sorry. Another thing, could you also,
> please, add a license / copyright header to
> include/media/soc_camera_platform.h?

I'm not asking you to keep the board broken forever. It's just a
question of in which order the trees are getting merged. Again, I'd
rather see that this fix is put _on_top_ of the patches that are
already queued up in the SuperH tree. Merging it before doesn't help
anything in my opinion - especially since the change should go though
the SuperH tree anyway.

Feel free to add any header you like. =)

/ magnus

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  8:03           ` Magnus Damm
@ 2008-10-15  8:26             ` Guennadi Liakhovetski
  2008-10-15  8:55               ` Magnus Damm
  0 siblings, 1 reply; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-15  8:26 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel, Magnus Damm

On Wed, 15 Oct 2008, Magnus Damm wrote:

> Hi Guennadi,
> 
> On Wed, Oct 15, 2008 at 3:41 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > Hi Magnus
> >
> > On Wed, 15 Oct 2008, Magnus Damm wrote:
> >
> >> Thanks for working on fixing the breakage. I'd prefer to wait a bit
> >> since there are quite a few pinmux patches queued up that may break if
> >> we merge a fix right now. I can fix it up later on.
> >
> > no, I would not leave the kernel in a non-compilable state even if just
> > for one board. Please, test a new version of the patch below. And yes, You
> > will have to rebase your patches, sorry. Another thing, could you also,
> > please, add a license / copyright header to
> > include/media/soc_camera_platform.h?
> 
> I'm not asking you to keep the board broken forever. It's just a
> question of in which order the trees are getting merged. Again, I'd
> rather see that this fix is put _on_top_ of the patches that are
> already queued up in the SuperH tree. Merging it before doesn't help
> anything in my opinion - especially since the change should go though
> the SuperH tree anyway.

I think, compilation-breakage fixes should have higher priority than 
further enhancements. Think about bisection. If you now first commit 
several more patches, you make the interval where the tree is not 
compilable longer, and thus the probabiliy that someone hits it in their 
git.bisect higher. That's why I think any compilation breakage should be 
fixed ASAP. And which changes do you mean specifically? This one:

http://marc.info/?l=linux-sh&m=122346619318532&w=2

Yes, indeed they conflict, but it is trivial to fix. So, I would prefer to 
close the compile-breakage window ASAP, and then trivially update that one 
your patch. Let's see what others say. And as for through which tree it 
should go, if you insist the sh-part going through the sh-tree, then it 
has to be split into two parts - video and sh. Thus extending the 
breakage-window by one commit...

> Feel free to add any header you like. =)

Thanks, but no thanks:-) I cannot add your copyright, at least not without 
your explicit agreement (I think). So, I'd prefer you submit a patch for 
that.

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

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  8:26             ` Guennadi Liakhovetski
@ 2008-10-15  8:55               ` Magnus Damm
  2008-10-15  9:07                 ` Guennadi Liakhovetski
  2008-10-15 10:52                 ` [PATCH v2] " Guennadi Liakhovetski
  0 siblings, 2 replies; 12+ messages in thread
From: Magnus Damm @ 2008-10-15  8:55 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel, Magnus Damm

On Wed, Oct 15, 2008 at 5:26 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Wed, 15 Oct 2008, Magnus Damm wrote:
>> On Wed, Oct 15, 2008 at 3:41 PM, Guennadi Liakhovetski
>> <g.liakhovetski@gmx.de> wrote:
>> > On Wed, 15 Oct 2008, Magnus Damm wrote:
>> >
>> >> Thanks for working on fixing the breakage. I'd prefer to wait a bit
>> >> since there are quite a few pinmux patches queued up that may break if
>> >> we merge a fix right now. I can fix it up later on.
>> >
>> > no, I would not leave the kernel in a non-compilable state even if just
>> > for one board. Please, test a new version of the patch below. And yes, You
>> > will have to rebase your patches, sorry. Another thing, could you also,
>> > please, add a license / copyright header to
>> > include/media/soc_camera_platform.h?
>>
>> I'm not asking you to keep the board broken forever. It's just a
>> question of in which order the trees are getting merged. Again, I'd
>> rather see that this fix is put _on_top_ of the patches that are
>> already queued up in the SuperH tree. Merging it before doesn't help
>> anything in my opinion - especially since the change should go though
>> the SuperH tree anyway.
>
> I think, compilation-breakage fixes should have higher priority than
> further enhancements. Think about bisection. If you now first commit
> several more patches, you make the interval where the tree is not
> compilable longer, and thus the probabiliy that someone hits it in their
> git.bisect higher. That's why I think any compilation breakage should be
> fixed ASAP. And which changes do you mean specifically? This one:
>
> http://marc.info/?l=linux-sh&m=122346619318532&w=2
>
> Yes, indeed they conflict, but it is trivial to fix. So, I would prefer to
> close the compile-breakage window ASAP, and then trivially update that one
> your patch. Let's see what others say. And as for through which tree it
> should go, if you insist the sh-part going through the sh-tree, then it
> has to be split into two parts - video and sh. Thus extending the
> breakage-window by one commit...

Yeah, that one plus a patch for the smc91x platform data and another
one for mmc (which needs updating anyway). So maybe it's not such a
big deal. And I see your point with closing the window ASAP to do
damage control. Otoh I wonder how big difference it will be extending
the breakage window with one commit - there must be zillions of
commits in after the breakage already.

Paul, any strong feelings regarding merging things though the SuperH tree?

>> Feel free to add any header you like. =)
>
> Thanks, but no thanks:-) I cannot add your copyright, at least not without
> your explicit agreement (I think). So, I'd prefer you submit a patch for
> that.

I wonder if it's a large enough bit sequence to actually copyright. =)
But sure, I'll do that.

Is this .29 material, or will there be a second v4l round with trivial
driver changes for .28?

I've already posted some vivi patches and two simple patches for the
sh_mobile_ceu driver - sorry about the timing - and i have one more
sh_mobile_ceu patch outstanding. Also, I think one of my coworkers may
post a soc_camera driver for ov772x chips soon too.

Is there any chance that can get included in .28?

Thank you!

/ magnus

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

* Re: [PATCH] soc-camera: fix compile breakage on SH
  2008-10-15  8:55               ` Magnus Damm
@ 2008-10-15  9:07                 ` Guennadi Liakhovetski
  2008-10-15 10:52                 ` [PATCH v2] " Guennadi Liakhovetski
  1 sibling, 0 replies; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-15  9:07 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel, Magnus Damm

On Wed, 15 Oct 2008, Magnus Damm wrote:

> Yeah, that one plus a patch for the smc91x platform data and another
> one for mmc (which needs updating anyway). So maybe it's not such a
> big deal. And I see your point with closing the window ASAP to do
> damage control. Otoh I wonder how big difference it will be extending
> the breakage window with one commit - there must be zillions of
> commits in after the breakage already.

So, let's close it ASAP.

> Paul, any strong feelings regarding merging things though the SuperH tree?

Hm, I think, soc_camera_platform parts would have to go through v4l tree. 
Unless we ask Andrew / Linus apply a fix directly to minimize the window, 
after you test it of course:-)

> > Thanks, but no thanks:-) I cannot add your copyright, at least not without
> > your explicit agreement (I think). So, I'd prefer you submit a patch for
> > that.
> 
> I wonder if it's a large enough bit sequence to actually copyright. =)
> But sure, I'll do that.

Good, thanks.

> Is this .29 material, or will there be a second v4l round with trivial
> driver changes for .28?
> 
> I've already posted some vivi patches and two simple patches for the
> sh_mobile_ceu driver - sorry about the timing - and i have one more
> sh_mobile_ceu patch outstanding. Also, I think one of my coworkers may
> post a soc_camera driver for ov772x chips soon too.
> 
> Is there any chance that can get included in .28?

I think there is still a chane, if we are fast enough. In any case I 
queued your sh_mobile_ceu patches, will try to push them on to Mauro 
latest this weekend.

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

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

* [PATCH v2] soc-camera: fix compile breakage on SH
  2008-10-15  8:55               ` Magnus Damm
  2008-10-15  9:07                 ` Guennadi Liakhovetski
@ 2008-10-15 10:52                 ` Guennadi Liakhovetski
  2008-10-16 23:08                   ` Guennadi Liakhovetski
  1 sibling, 1 reply; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-15 10:52 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Adrian Bunk, Stefan Herbrechtsmeier, Mauro Carvalho Chehab,
	lethal, linux-sh, video4linux-list, linux-kernel

Fix Migo-R compile breakage caused by incomplete merge. Also remove 
redundant soc_camera_platform_info struct definition from 
drivers/media/video/soc_camera_platform.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Magnus Damm <damm@igel.co.jp>

---

Paul, Mauro, as this patch closes a compile-breakage, I'd like to get it 
upstream asap. What would be the fastest way: get your both Acked-by and 
send it directly to Andrew / Linus, or an Acked-by from one of you and 
let the other one merge (you can decide who does what:-)) Splitting it 
into two patches and merging separately seems suboptimal to me in this 
case.

Thanks
Guennadi

diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 714dce9..95459f3 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -312,6 +312,14 @@ static void camera_power_off(void)
 	ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
 }
 
+static void camera_power(int mode)
+{
+	if (mode)
+		camera_power_on();
+	else
+		camera_power_off();
+}
+
 #ifdef CONFIG_I2C
 static unsigned char camera_ov772x_magic[] =
 {
@@ -391,6 +399,7 @@ static struct soc_camera_platform_info ov772x_info = {
 	},
 	.bus_param =  SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
 	SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
+	.power = camera_power,
 	.set_capture = ov772x_set_capture,
 };
 
@@ -405,8 +414,6 @@ static struct platform_device migor_camera_device = {
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
 	| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
-	.enable_camera = camera_power_on,
-	.disable_camera = camera_power_off,
 };
 
 static struct resource migor_ceu_resources[] = {
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
index 1adc257..bb7a9d4 100644
--- a/drivers/media/video/soc_camera_platform.c
+++ b/drivers/media/video/soc_camera_platform.c
@@ -18,15 +18,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-common.h>
 #include <media/soc_camera.h>
-
-struct soc_camera_platform_info {
-	int iface;
-	char *format_name;
-	unsigned long format_depth;
-	struct v4l2_pix_format format;
-	unsigned long bus_param;
-	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
-};
+#include <media/soc_camera_platform.h>
 
 struct soc_camera_platform_priv {
 	struct soc_camera_platform_info *info;
@@ -44,11 +36,21 @@ soc_camera_platform_get_info(struct soc_camera_device *icd)
 
 static int soc_camera_platform_init(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(1);
+
 	return 0;
 }
 
 static int soc_camera_platform_release(struct soc_camera_device *icd)
 {
+	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+	if (p->power)
+		p->power(0);
+
 	return 0;
 }
 
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 851f182..7c81ad3 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -9,6 +9,7 @@ struct soc_camera_platform_info {
 	unsigned long format_depth;
 	struct v4l2_pix_format format;
 	unsigned long bus_param;
+	void (*power)(int);
 	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
 };
 

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

* Re: [PATCH v2] soc-camera: fix compile breakage on SH
  2008-10-15 10:52                 ` [PATCH v2] " Guennadi Liakhovetski
@ 2008-10-16 23:08                   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 12+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-16 23:08 UTC (permalink / raw)
  To: Magnus Damm
  Cc: video4linux-list, Mauro Carvalho Chehab, linux-sh, linux-kernel, lethal

On Wed, 15 Oct 2008, Guennadi Liakhovetski wrote:

> Fix Migo-R compile breakage caused by incomplete merge. Also remove 
> redundant soc_camera_platform_info struct definition from 
> drivers/media/video/soc_camera_platform.c

Ok, I got no acks to this one, so, let's drop it, I'll submit its two 
parts to the v4l and sh lists and maintainers independently.

Thanks
Guennadi

> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Tested-by: Magnus Damm <damm@igel.co.jp>
> 
> ---
> 
> Paul, Mauro, as this patch closes a compile-breakage, I'd like to get it 
> upstream asap. What would be the fastest way: get your both Acked-by and 
> send it directly to Andrew / Linus, or an Acked-by from one of you and 
> let the other one merge (you can decide who does what:-)) Splitting it 
> into two patches and merging separately seems suboptimal to me in this 
> case.
> 
> Thanks
> Guennadi
> 
> diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> index 714dce9..95459f3 100644
> --- a/arch/sh/boards/mach-migor/setup.c
> +++ b/arch/sh/boards/mach-migor/setup.c
> @@ -312,6 +312,14 @@ static void camera_power_off(void)
>  	ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
>  }
>  
> +static void camera_power(int mode)
> +{
> +	if (mode)
> +		camera_power_on();
> +	else
> +		camera_power_off();
> +}
> +
>  #ifdef CONFIG_I2C
>  static unsigned char camera_ov772x_magic[] =
>  {
> @@ -391,6 +399,7 @@ static struct soc_camera_platform_info ov772x_info = {
>  	},
>  	.bus_param =  SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
>  	SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
> +	.power = camera_power,
>  	.set_capture = ov772x_set_capture,
>  };
>  
> @@ -405,8 +414,6 @@ static struct platform_device migor_camera_device = {
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
>  	| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
> -	.enable_camera = camera_power_on,
> -	.disable_camera = camera_power_off,
>  };
>  
>  static struct resource migor_ceu_resources[] = {
> diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
> index 1adc257..bb7a9d4 100644
> --- a/drivers/media/video/soc_camera_platform.c
> +++ b/drivers/media/video/soc_camera_platform.c
> @@ -18,15 +18,7 @@
>  #include <linux/videodev2.h>
>  #include <media/v4l2-common.h>
>  #include <media/soc_camera.h>
> -
> -struct soc_camera_platform_info {
> -	int iface;
> -	char *format_name;
> -	unsigned long format_depth;
> -	struct v4l2_pix_format format;
> -	unsigned long bus_param;
> -	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
> -};
> +#include <media/soc_camera_platform.h>
>  
>  struct soc_camera_platform_priv {
>  	struct soc_camera_platform_info *info;
> @@ -44,11 +36,21 @@ soc_camera_platform_get_info(struct soc_camera_device *icd)
>  
>  static int soc_camera_platform_init(struct soc_camera_device *icd)
>  {
> +	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
> +
> +	if (p->power)
> +		p->power(1);
> +
>  	return 0;
>  }
>  
>  static int soc_camera_platform_release(struct soc_camera_device *icd)
>  {
> +	struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
> +
> +	if (p->power)
> +		p->power(0);
> +
>  	return 0;
>  }
>  
> diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
> index 851f182..7c81ad3 100644
> --- a/include/media/soc_camera_platform.h
> +++ b/include/media/soc_camera_platform.h
> @@ -9,6 +9,7 @@ struct soc_camera_platform_info {
>  	unsigned long format_depth;
>  	struct v4l2_pix_format format;
>  	unsigned long bus_param;
> +	void (*power)(int);
>  	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
>  };
>  
> 
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
> 

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

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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14 18:39 sh/boards/mach-migor/setup.c build error Adrian Bunk
2008-10-14 21:53 ` [PATCH] soc-camera: fix compile breakage on SH Guennadi Liakhovetski
2008-10-15  3:33   ` Adrian Bunk
2008-10-15  5:20     ` Adrian Bunk
2008-10-15  6:28       ` Magnus Damm
2008-10-15  6:41         ` Guennadi Liakhovetski
2008-10-15  8:03           ` Magnus Damm
2008-10-15  8:26             ` Guennadi Liakhovetski
2008-10-15  8:55               ` Magnus Damm
2008-10-15  9:07                 ` Guennadi Liakhovetski
2008-10-15 10:52                 ` [PATCH v2] " Guennadi Liakhovetski
2008-10-16 23:08                   ` Guennadi Liakhovetski

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

all inboxes | Powered by JetHome®