v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
On Mon, 20 Apr 2009, Magnus Damm wrote: On Mon, Apr 20, 2009 at 5:14 PM, Guennadi Liakhovetski g.liakhovet...@gmx.de wrote: On Mon, 20 Apr 2009, Magnus Damm wrote: Can you please test on your Migo-R board? I'd be happy to assist you in setting up your environment. I did test it and it worked - exactly as you say - with the entire patch stack + v2 of soc-camera: convert to platform device, the only difference that I can see so far, is that I used modules. So, you can either look in dmesg for driver initialisation whether ov772x and tw9910 have found theit i2c chips, or just wait until I test a monolitic build myself. It can be problematic if the i2c-host driver initialises too late... If you want to test a modular build it would be enough to just have sh_mobile_ceu_camera.ko as a module, the rest can stay built in. I prefer to wait then. Please consider the built-in case broken. Usually I get some output similar to this during boot: camera 0-0: SuperH Mobile CEU driver attached to camera 0 camera 0-0: ov7725 Product ID 77:21 Manufacturer ID 7f:a2 camera 0-0: SuperH Mobile CEU driver detached from camera 0 But with the convert to platform device patch appied I see nothing like that. The migor_defconfig should give you the static non-module configuration that is broken. Ok, static build is indeed broken. The reason is the wrong initialisation order. First, internally we have to link camera host drivers after camera device drivers, that's easy. But unfortunately that alone doesn't help. The second problem is that i2c is linked after media, or, maybe rather media is linked before i2c. Currently in drivers/Makefile media is on the same line as base and block, way before IDE, ATA, SCSI, firewire, mtd, spi, usb, input... Is there a reason for that? Mauro, would anything break if we move it down right after i2c? Another hackish interim solution would be to replace module_init with subsys_init in i2c-sh_mobile.c like some other i2c adapters do (including MXC, PXA). That's certainly easier, but then we'd also have to modify i2c-imx, later maybe i2c-at91.c... Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
On Mon, Apr 20, 2009 at 03:50:44PM +0200, Guennadi Liakhovetski wrote: break if we move it down right after i2c? Another hackish interim solution would be to replace module_init with subsys_init in i2c-sh_mobile.c like some other i2c adapters do (including MXC, PXA). That's certainly easier, but then we'd also have to modify i2c-imx, later maybe i2c-at91.c... That'd be sensible long term anyway - voltage and current regulators are often I2C devices and they need to be initialised very early in order to be available for general use. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
On Mon, 20 Apr 2009, Mark Brown wrote: On Mon, Apr 20, 2009 at 03:50:44PM +0200, Guennadi Liakhovetski wrote: break if we move it down right after i2c? Another hackish interim solution would be to replace module_init with subsys_init in i2c-sh_mobile.c like some other i2c adapters do (including MXC, PXA). That's certainly easier, but then we'd also have to modify i2c-imx, later maybe i2c-at91.c... That'd be sensible long term anyway - voltage and current regulators are often I2C devices and they need to be initialised very early in order to be available for general use. If there are other requirements to have i2c initialise early we can well move it up the chain. I think it would be preferable to modifying each i2c host adapter driver to use subsys_init(). Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
On Mon, Apr 20, 2009 at 04:18:41PM +0200, Guennadi Liakhovetski wrote: If there are other requirements to have i2c initialise early we can well move it up the chain. I think it would be preferable to modifying each i2c host adapter driver to use subsys_init(). IIRC there are other ordering constraints on I2C in general that cause problems there in non-embedded cases but I might be misremembering. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html