linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
@ 2012-10-30 12:03 Fabio Estevam
  2012-10-30 12:03 ` [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion Fabio Estevam
  2012-10-31 11:56 ` [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Mauro Carvalho Chehab
  0 siblings, 2 replies; 12+ messages in thread
From: Fabio Estevam @ 2012-10-30 12:03 UTC (permalink / raw)
  To: g.liakhovetski
  Cc: kernel, mchehab, gcembed, javier.martin, linux-media,
	linux-arm-kernel, Fabio Estevam

During the clock conversion for mx27 the "per4_gate" clock was missed to get
registered as a dependency of mx2-camera driver.

In the old mx27 clock driver we used to have:

DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk);

,so does the same in the new clock driver

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v3:
- Use imx27-camera.0 instead of mx2-camera.0, due to recent changes in the
imx27 clock (commit 27b76486a3: media: mx2_camera: remove cpu_is_xxx by using platform_device_id)

 arch/arm/mach-imx/clk-imx27.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 585ab25..2880bd9 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -224,6 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
 	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
+	clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
-- 
1.7.9.5



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

* [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion
  2012-10-30 12:03 [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Fabio Estevam
@ 2012-10-30 12:03 ` Fabio Estevam
  2012-10-31 11:57   ` Mauro Carvalho Chehab
  2012-10-31 11:56 ` [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Mauro Carvalho Chehab
  1 sibling, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-10-30 12:03 UTC (permalink / raw)
  To: g.liakhovetski
  Cc: kernel, mchehab, gcembed, javier.martin, linux-media,
	linux-arm-kernel, Fabio Estevam

Since mx27 transitioned to the commmon clock framework in 3.5, the correct way
to acquire the csi clock is to get csi_ahb and csi_per clocks separately.

By not doing so the camera sensor does not probe correctly:

soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
mx2-camera mx2-camera.0: Camera driver attached to camera 0
ov2640 0-0030: Product ID error fb:fb
mx2-camera mx2-camera.0: Camera driver detached from camera 0
mx2-camera mx2-camera.0: MX2 Camera (CSI) driver probed, clock frequency: 66500000

Adapt the mx2_camera driver to the new clock framework and make it functional
again.

Tested-by: Gaëtan Carlier <gcembed@gmail.com>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v3:
- Drop unneeded clk_unprepare calls as pointed out by Guennadi
Changes since v2:
- Fix clock error handling code as pointed out by Russell King
Changes since v1:
- Rebased against linux-next 20121008.
 drivers/media/platform/soc_camera/mx2_camera.c |   39 ++++++++++++++++++------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c
index e575ae8..558f6a3 100644
--- a/drivers/media/platform/soc_camera/mx2_camera.c
+++ b/drivers/media/platform/soc_camera/mx2_camera.c
@@ -278,7 +278,8 @@ struct mx2_camera_dev {
 	struct device		*dev;
 	struct soc_camera_host	soc_host;
 	struct soc_camera_device *icd;
-	struct clk		*clk_csi, *clk_emma_ahb, *clk_emma_ipg;
+	struct clk		*clk_emma_ahb, *clk_emma_ipg;
+	struct clk		*clk_csi_ahb, *clk_csi_per;
 
 	void __iomem		*base_csi, *base_emma;
 
@@ -464,7 +465,8 @@ static void mx2_camera_deactivate(struct mx2_camera_dev *pcdev)
 {
 	unsigned long flags;
 
-	clk_disable_unprepare(pcdev->clk_csi);
+	clk_disable_unprepare(pcdev->clk_csi_ahb);
+	clk_disable_unprepare(pcdev->clk_csi_per);
 	writel(0, pcdev->base_csi + CSICR1);
 	if (is_imx27_camera(pcdev)) {
 		writel(0, pcdev->base_emma + PRP_CNTL);
@@ -492,10 +494,14 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
 	if (pcdev->icd)
 		return -EBUSY;
 
-	ret = clk_prepare_enable(pcdev->clk_csi);
+	ret = clk_prepare_enable(pcdev->clk_csi_ahb);
 	if (ret < 0)
 		return ret;
 
+	ret = clk_prepare_enable(pcdev->clk_csi_per);
+	if (ret < 0)
+		goto exit_csi_ahb;
+
 	csicr1 = CSICR1_MCLKEN;
 
 	if (is_imx27_camera(pcdev))
@@ -512,6 +518,11 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
 		 icd->devnum);
 
 	return 0;
+
+exit_csi_ahb:
+	clk_disable_unprepare(pcdev->clk_csi_ahb);
+
+	return ret;
 }
 
 static void mx2_camera_remove_device(struct soc_camera_device *icd)
@@ -1772,10 +1783,17 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
 		break;
 	}
 
-	pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb");
-	if (IS_ERR(pcdev->clk_csi)) {
-		dev_err(&pdev->dev, "Could not get csi clock\n");
-		err = PTR_ERR(pcdev->clk_csi);
+	pcdev->clk_csi_ahb = devm_clk_get(&pdev->dev, "ahb");
+	if (IS_ERR(pcdev->clk_csi_ahb)) {
+		dev_err(&pdev->dev, "Could not get csi ahb clock\n");
+		err = PTR_ERR(pcdev->clk_csi_ahb);
+		goto exit;
+	}
+
+	pcdev->clk_csi_per = devm_clk_get(&pdev->dev, "per");
+	if (IS_ERR(pcdev->clk_csi_per)) {
+		dev_err(&pdev->dev, "Could not get csi per clock\n");
+		err = PTR_ERR(pcdev->clk_csi_per);
 		goto exit;
 	}
 
@@ -1785,12 +1803,13 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
 
 		pcdev->platform_flags = pcdev->pdata->flags;
 
-		rate = clk_round_rate(pcdev->clk_csi, pcdev->pdata->clk * 2);
+		rate = clk_round_rate(pcdev->clk_csi_per,
+						pcdev->pdata->clk * 2);
 		if (rate <= 0) {
 			err = -ENODEV;
 			goto exit;
 		}
-		err = clk_set_rate(pcdev->clk_csi, rate);
+		err = clk_set_rate(pcdev->clk_csi_per, rate);
 		if (err < 0)
 			goto exit;
 	}
@@ -1848,7 +1867,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
 		goto exit_free_emma;
 
 	dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n",
-			clk_get_rate(pcdev->clk_csi));
+			clk_get_rate(pcdev->clk_csi_per));
 
 	return 0;
 
-- 
1.7.9.5



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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-30 12:03 [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Fabio Estevam
  2012-10-30 12:03 ` [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion Fabio Estevam
@ 2012-10-31 11:56 ` Mauro Carvalho Chehab
  2012-10-31 13:16   ` Sascha Hauer
  1 sibling, 1 reply; 12+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-31 11:56 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: g.liakhovetski, kernel, gcembed, javier.martin, linux-media,
	linux-arm-kernel

Em Tue, 30 Oct 2012 10:03:25 -0200
Fabio Estevam <fabio.estevam@freescale.com> escreveu:

> During the clock conversion for mx27 the "per4_gate" clock was missed to get
> registered as a dependency of mx2-camera driver.
> 
> In the old mx27 clock driver we used to have:
> 
> DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk);
> 
> ,so does the same in the new clock driver
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

As it seems that those patches depend on some patches at the arm tree,
the better is to merge them via -arm tree.

So,

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>

> ---
> Changes since v3:
> - Use imx27-camera.0 instead of mx2-camera.0, due to recent changes in the
> imx27 clock (commit 27b76486a3: media: mx2_camera: remove cpu_is_xxx by using platform_device_id)
> 
>  arch/arm/mach-imx/clk-imx27.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
> index 585ab25..2880bd9 100644
> --- a/arch/arm/mach-imx/clk-imx27.c
> +++ b/arch/arm/mach-imx/clk-imx27.c
> @@ -224,6 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
>  	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
>  	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
>  	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
> +	clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0");
>  	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
>  	clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
>  	clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");




Cheers,
Mauro

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

* Re: [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion
  2012-10-30 12:03 ` [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion Fabio Estevam
@ 2012-10-31 11:57   ` Mauro Carvalho Chehab
  2012-11-14 18:22     ` Fabio Estevam
  0 siblings, 1 reply; 12+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-31 11:57 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: g.liakhovetski, kernel, gcembed, javier.martin, linux-media,
	linux-arm-kernel

Em Tue, 30 Oct 2012 10:03:26 -0200
Fabio Estevam <fabio.estevam@freescale.com> escreveu:

> Since mx27 transitioned to the commmon clock framework in 3.5, the correct way
> to acquire the csi clock is to get csi_ahb and csi_per clocks separately.
> 
> By not doing so the camera sensor does not probe correctly:
> 
> soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
> mx2-camera mx2-camera.0: Camera driver attached to camera 0
> ov2640 0-0030: Product ID error fb:fb
> mx2-camera mx2-camera.0: Camera driver detached from camera 0
> mx2-camera mx2-camera.0: MX2 Camera (CSI) driver probed, clock frequency: 66500000
> 
> Adapt the mx2_camera driver to the new clock framework and make it functional
> again.
> 
> Tested-by: Gaëtan Carlier <gcembed@gmail.com>
> Tested-by: Javier Martin <javier.martin@vista-silicon.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

As it seems that those patches depend on some patches at the arm tree,
the better is to merge them via -arm tree.

So,

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>

> ---
> Changes since v3:
> - Drop unneeded clk_unprepare calls as pointed out by Guennadi
> Changes since v2:
> - Fix clock error handling code as pointed out by Russell King
> Changes since v1:
> - Rebased against linux-next 20121008.
>  drivers/media/platform/soc_camera/mx2_camera.c |   39 ++++++++++++++++++------
>  1 file changed, 29 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c
> index e575ae8..558f6a3 100644
> --- a/drivers/media/platform/soc_camera/mx2_camera.c
> +++ b/drivers/media/platform/soc_camera/mx2_camera.c
> @@ -278,7 +278,8 @@ struct mx2_camera_dev {
>  	struct device		*dev;
>  	struct soc_camera_host	soc_host;
>  	struct soc_camera_device *icd;
> -	struct clk		*clk_csi, *clk_emma_ahb, *clk_emma_ipg;
> +	struct clk		*clk_emma_ahb, *clk_emma_ipg;
> +	struct clk		*clk_csi_ahb, *clk_csi_per;
>  
>  	void __iomem		*base_csi, *base_emma;
>  
> @@ -464,7 +465,8 @@ static void mx2_camera_deactivate(struct mx2_camera_dev *pcdev)
>  {
>  	unsigned long flags;
>  
> -	clk_disable_unprepare(pcdev->clk_csi);
> +	clk_disable_unprepare(pcdev->clk_csi_ahb);
> +	clk_disable_unprepare(pcdev->clk_csi_per);
>  	writel(0, pcdev->base_csi + CSICR1);
>  	if (is_imx27_camera(pcdev)) {
>  		writel(0, pcdev->base_emma + PRP_CNTL);
> @@ -492,10 +494,14 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
>  	if (pcdev->icd)
>  		return -EBUSY;
>  
> -	ret = clk_prepare_enable(pcdev->clk_csi);
> +	ret = clk_prepare_enable(pcdev->clk_csi_ahb);
>  	if (ret < 0)
>  		return ret;
>  
> +	ret = clk_prepare_enable(pcdev->clk_csi_per);
> +	if (ret < 0)
> +		goto exit_csi_ahb;
> +
>  	csicr1 = CSICR1_MCLKEN;
>  
>  	if (is_imx27_camera(pcdev))
> @@ -512,6 +518,11 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
>  		 icd->devnum);
>  
>  	return 0;
> +
> +exit_csi_ahb:
> +	clk_disable_unprepare(pcdev->clk_csi_ahb);
> +
> +	return ret;
>  }
>  
>  static void mx2_camera_remove_device(struct soc_camera_device *icd)
> @@ -1772,10 +1783,17 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
>  		break;
>  	}
>  
> -	pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb");
> -	if (IS_ERR(pcdev->clk_csi)) {
> -		dev_err(&pdev->dev, "Could not get csi clock\n");
> -		err = PTR_ERR(pcdev->clk_csi);
> +	pcdev->clk_csi_ahb = devm_clk_get(&pdev->dev, "ahb");
> +	if (IS_ERR(pcdev->clk_csi_ahb)) {
> +		dev_err(&pdev->dev, "Could not get csi ahb clock\n");
> +		err = PTR_ERR(pcdev->clk_csi_ahb);
> +		goto exit;
> +	}
> +
> +	pcdev->clk_csi_per = devm_clk_get(&pdev->dev, "per");
> +	if (IS_ERR(pcdev->clk_csi_per)) {
> +		dev_err(&pdev->dev, "Could not get csi per clock\n");
> +		err = PTR_ERR(pcdev->clk_csi_per);
>  		goto exit;
>  	}
>  
> @@ -1785,12 +1803,13 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
>  
>  		pcdev->platform_flags = pcdev->pdata->flags;
>  
> -		rate = clk_round_rate(pcdev->clk_csi, pcdev->pdata->clk * 2);
> +		rate = clk_round_rate(pcdev->clk_csi_per,
> +						pcdev->pdata->clk * 2);
>  		if (rate <= 0) {
>  			err = -ENODEV;
>  			goto exit;
>  		}
> -		err = clk_set_rate(pcdev->clk_csi, rate);
> +		err = clk_set_rate(pcdev->clk_csi_per, rate);
>  		if (err < 0)
>  			goto exit;
>  	}
> @@ -1848,7 +1867,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
>  		goto exit_free_emma;
>  
>  	dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n",
> -			clk_get_rate(pcdev->clk_csi));
> +			clk_get_rate(pcdev->clk_csi_per));
>  
>  	return 0;
>  




Cheers,
Mauro

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 11:56 ` [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Mauro Carvalho Chehab
@ 2012-10-31 13:16   ` Sascha Hauer
  2012-10-31 13:24     ` Fabio Estevam
  0 siblings, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2012-10-31 13:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Fabio Estevam, g.liakhovetski, kernel, gcembed, javier.martin,
	linux-media, linux-arm-kernel

Hi Mauro,

On Wed, Oct 31, 2012 at 09:56:32AM -0200, Mauro Carvalho Chehab wrote:
> Em Tue, 30 Oct 2012 10:03:25 -0200
> Fabio Estevam <fabio.estevam@freescale.com> escreveu:
> 
> > During the clock conversion for mx27 the "per4_gate" clock was missed to get
> > registered as a dependency of mx2-camera driver.
> > 
> > In the old mx27 clock driver we used to have:
> > 
> > DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk);
> > 
> > ,so does the same in the new clock driver
> > 
> > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> As it seems that those patches depend on some patches at the arm tree,
> the better is to merge them via -arm tree.

Quoting yourself:

> Forgot to comment: as patch 2 relies on this change, the better, IMHO, is
> to send both via the same tree. If you decide to do so, please get arm
> maintainer's ack, instead, and we can merge both via my tree.

That's why Fabio resent these patches with my Ack. You are free to take
these.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 13:16   ` Sascha Hauer
@ 2012-10-31 13:24     ` Fabio Estevam
  2012-10-31 13:53       ` Guennadi Liakhovetski
  0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-10-31 13:24 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Mauro Carvalho Chehab, Fabio Estevam, g.liakhovetski, kernel,
	gcembed, javier.martin, linux-media, linux-arm-kernel

Hi Sascha,

On Wed, Oct 31, 2012 at 11:16 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Quoting yourself:
>
>> Forgot to comment: as patch 2 relies on this change, the better, IMHO, is
>> to send both via the same tree. If you decide to do so, please get arm
>> maintainer's ack, instead, and we can merge both via my tree.
>
> That's why Fabio resent these patches with my Ack. You are free to take
> these.

I have just realized that this patch (1/2) will not apply against
media tree because it does not have commit 27b76486a3 (media:
mx2_camera: remove cpu_is_xxx by using platform_device_id), which
changes from mx2_camera.0 to imx27-camera.0.

So it seems to be better to merge this via arm tree to avoid such conflict.

Regards,

Fabio Estevam

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 13:24     ` Fabio Estevam
@ 2012-10-31 13:53       ` Guennadi Liakhovetski
  2012-10-31 18:53         ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 12+ messages in thread
From: Guennadi Liakhovetski @ 2012-10-31 13:53 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Sascha Hauer, Mauro Carvalho Chehab, Fabio Estevam, kernel,
	gcembed, javier Martin, Linux Media Mailing List,
	linux-arm-kernel, Shawn Guo

On Wed, 31 Oct 2012, Fabio Estevam wrote:

> Hi Sascha,
> 
> On Wed, Oct 31, 2012 at 11:16 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > Quoting yourself:
> >
> >> Forgot to comment: as patch 2 relies on this change, the better, IMHO, is
> >> to send both via the same tree. If you decide to do so, please get arm
> >> maintainer's ack, instead, and we can merge both via my tree.
> >
> > That's why Fabio resent these patches with my Ack. You are free to take
> > these.
> 
> I have just realized that this patch (1/2) will not apply against
> media tree because it does not have commit 27b76486a3 (media:
> mx2_camera: remove cpu_is_xxx by using platform_device_id), which
> changes from mx2_camera.0 to imx27-camera.0.

This is exactly the reason why I wasn't able to merge it. The problem was, 
that this "media: mx2_camera: remove cpu_is_xxx by using 
platform_device_id" patch non-trivially touched both arch/arm/ and 
drivers/media/ directories. And being patch 27/34 I didn't feel like 
asking the author to redo it again:-) This confirms, that it's better to 
avoid such overlapping patches whenever possible.

> So it seems to be better to merge this via arm tree to avoid such conflict.

Thanks
Guennadi

> Regards,
> 
> Fabio Estevam

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 13:53       ` Guennadi Liakhovetski
@ 2012-10-31 18:53         ` Mauro Carvalho Chehab
  2012-10-31 19:02           ` Sascha Hauer
  0 siblings, 1 reply; 12+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-31 18:53 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Guennadi Liakhovetski, Fabio Estevam, Fabio Estevam, kernel,
	gcembed, javier Martin, Linux Media Mailing List,
	linux-arm-kernel, Shawn Guo

Em Wed, 31 Oct 2012 14:53:47 +0100 (CET)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> escreveu:

> On Wed, 31 Oct 2012, Fabio Estevam wrote:
> 
> > Hi Sascha,
> > 
> > On Wed, Oct 31, 2012 at 11:16 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > 
> > > Quoting yourself:
> > >
> > >> Forgot to comment: as patch 2 relies on this change, the better, IMHO, is
> > >> to send both via the same tree. If you decide to do so, please get arm
> > >> maintainer's ack, instead, and we can merge both via my tree.
> > >
> > > That's why Fabio resent these patches with my Ack. You are free to take
> > > these.
> > 
> > I have just realized that this patch (1/2) will not apply against
> > media tree because it does not have commit 27b76486a3 (media:
> > mx2_camera: remove cpu_is_xxx by using platform_device_id), which
> > changes from mx2_camera.0 to imx27-camera.0.
> 
> This is exactly the reason why I wasn't able to merge it. The problem was, 
> that this "media: mx2_camera: remove cpu_is_xxx by using 
> platform_device_id" patch non-trivially touched both arch/arm/ and 
> drivers/media/ directories. And being patch 27/34 I didn't feel like 
> asking the author to redo it again:-) This confirms, that it's better to 
> avoid such overlapping patches whenever possible.
> 
> > So it seems to be better to merge this via arm tree to avoid such conflict.

I agree with Fabio and Guennadi. There are so many changes happening at arm
that merging those two patches there will likely be easier for everybody. 

Otherwise, I'll need to pull from some arm tree that never rebase, with
the needed patches, and coordinate with you during the merge window,
to be sure that patches will arrive there at the right order, from the
right tree.

Cheers,
Mauro

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 18:53         ` Mauro Carvalho Chehab
@ 2012-10-31 19:02           ` Sascha Hauer
  2012-10-31 19:50             ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2012-10-31 19:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Guennadi Liakhovetski, Fabio Estevam, Fabio Estevam, kernel,
	gcembed, javier Martin, Linux Media Mailing List,
	linux-arm-kernel, Shawn Guo

On Wed, Oct 31, 2012 at 04:53:03PM -0200, Mauro Carvalho Chehab wrote:
> Em Wed, 31 Oct 2012 14:53:47 +0100 (CET)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> escreveu:
> 
> > On Wed, 31 Oct 2012, Fabio Estevam wrote:
> > 
> > > Hi Sascha,
> > > 
> > > On Wed, Oct 31, 2012 at 11:16 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > > 
> > > > Quoting yourself:
> > > >
> > > >> Forgot to comment: as patch 2 relies on this change, the better, IMHO, is
> > > >> to send both via the same tree. If you decide to do so, please get arm
> > > >> maintainer's ack, instead, and we can merge both via my tree.
> > > >
> > > > That's why Fabio resent these patches with my Ack. You are free to take
> > > > these.
> > > 
> > > I have just realized that this patch (1/2) will not apply against
> > > media tree because it does not have commit 27b76486a3 (media:
> > > mx2_camera: remove cpu_is_xxx by using platform_device_id), which
> > > changes from mx2_camera.0 to imx27-camera.0.
> > 
> > This is exactly the reason why I wasn't able to merge it. The problem was, 
> > that this "media: mx2_camera: remove cpu_is_xxx by using 
> > platform_device_id" patch non-trivially touched both arch/arm/ and 
> > drivers/media/ directories. And being patch 27/34 I didn't feel like 
> > asking the author to redo it again:-) This confirms, that it's better to 
> > avoid such overlapping patches whenever possible.
> > 
> > > So it seems to be better to merge this via arm tree to avoid such conflict.
> 
> I agree with Fabio and Guennadi. There are so many changes happening at arm
> that merging those two patches there will likely be easier for everybody.

Ok, then I'll take them. I wasn't aware in arm-soc are sitting patches
for this driver already.

> 
> Otherwise, I'll need to pull from some arm tree that never rebase, with
> the needed patches, and coordinate with you during the merge window,
> to be sure that patches will arrive there at the right order, from the
> right tree.

Hopefully these kind of cross dependencies become fewer over time. SoC
code is getting smaller and gets better abstracted from the drivers, so
chances are good.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
  2012-10-31 19:02           ` Sascha Hauer
@ 2012-10-31 19:50             ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 12+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-31 19:50 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Guennadi Liakhovetski, Fabio Estevam, Fabio Estevam, kernel,
	gcembed, javier Martin, Linux Media Mailing List,
	linux-arm-kernel, Shawn Guo

Em Wed, 31 Oct 2012 20:02:49 +0100
Sascha Hauer <s.hauer@pengutronix.de> escreveu:

> On Wed, Oct 31, 2012 at 04:53:03PM -0200, Mauro Carvalho Chehab wrote:
> > Em Wed, 31 Oct 2012 14:53:47 +0100 (CET)
> > Guennadi Liakhovetski <g.liakhovetski@gmx.de> escreveu:
> > 
> > > On Wed, 31 Oct 2012, Fabio Estevam wrote:

> > I agree with Fabio and Guennadi. There are so many changes happening at arm
> > that merging those two patches there will likely be easier for everybody.
> 
> Ok, then I'll take them. I wasn't aware in arm-soc are sitting patches
> for this driver already.

Thank you!

> > 
> > Otherwise, I'll need to pull from some arm tree that never rebase, with
> > the needed patches, and coordinate with you during the merge window,
> > to be sure that patches will arrive there at the right order, from the
> > right tree.
> 
> Hopefully these kind of cross dependencies become fewer over time. SoC
> code is getting smaller and gets better abstracted from the drivers, so
> chances are good.

Yes, I'm expecting so.

Regards,
Mauro

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

* Re: [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion
  2012-10-31 11:57   ` Mauro Carvalho Chehab
@ 2012-11-14 18:22     ` Fabio Estevam
  2012-11-14 19:58       ` Sascha Hauer
  0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-11-14 18:22 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sascha Hauer
  Cc: Fabio Estevam, g.liakhovetski, kernel, gcembed, javier.martin,
	linux-media, linux-arm-kernel

Hi Sascha,

On Wed, Oct 31, 2012 at 9:57 AM, Mauro Carvalho Chehab
<mchehab@infradead.org> wrote:

> As it seems that those patches depend on some patches at the arm tree,
> the better is to merge them via -arm tree.
>
> So,
>
> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Could you please apply this series via your tree?

Thanks,

Fabio Estevam

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

* Re: [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion
  2012-11-14 18:22     ` Fabio Estevam
@ 2012-11-14 19:58       ` Sascha Hauer
  0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2012-11-14 19:58 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mauro Carvalho Chehab, Fabio Estevam, g.liakhovetski, kernel,
	gcembed, javier.martin, linux-media, linux-arm-kernel

On Wed, Nov 14, 2012 at 04:22:40PM -0200, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Wed, Oct 31, 2012 at 9:57 AM, Mauro Carvalho Chehab
> <mchehab@infradead.org> wrote:
> 
> > As it seems that those patches depend on some patches at the arm tree,
> > the better is to merge them via -arm tree.
> >
> > So,
> >
> > Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> 
> Could you please apply this series via your tree?

Sure, I already have this in my queue.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

end of thread, other threads:[~2012-11-14 19:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 12:03 [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Fabio Estevam
2012-10-30 12:03 ` [PATCH v4 2/2] mx2_camera: Fix regression caused by clock conversion Fabio Estevam
2012-10-31 11:57   ` Mauro Carvalho Chehab
2012-11-14 18:22     ` Fabio Estevam
2012-11-14 19:58       ` Sascha Hauer
2012-10-31 11:56 ` [PATCH v4 1/2] ARM: clk-imx27: Add missing clock for mx2-camera Mauro Carvalho Chehab
2012-10-31 13:16   ` Sascha Hauer
2012-10-31 13:24     ` Fabio Estevam
2012-10-31 13:53       ` Guennadi Liakhovetski
2012-10-31 18:53         ` Mauro Carvalho Chehab
2012-10-31 19:02           ` Sascha Hauer
2012-10-31 19:50             ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).