public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
       [not found]                 ` <aec7e5c30904200154w758e4ecl8174a4cb0bce11f9@mail.gmail.com>
@ 2009-04-20 13:50                   ` Guennadi Liakhovetski
  2009-04-20 14:04                     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2009-04-20 13:50 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Linux Media Mailing List, Robert Jarzmik, Kuninori Morimoto,
	linux-i2c, Greg KH, Mauro Carvalho Chehab

On Mon, 20 Apr 2009, Magnus Damm wrote:

> On Mon, Apr 20, 2009 at 5:14 PM, Guennadi Liakhovetski
> <g.liakhovetski@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/

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

* Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
  2009-04-20 13:50                   ` v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device Guennadi Liakhovetski
@ 2009-04-20 14:04                     ` Mark Brown
       [not found]                       ` <20090420140411.GE8776-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2009-04-20 14:04 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Magnus Damm, Linux Media Mailing List, Robert Jarzmik,
	Kuninori Morimoto, linux-i2c, Greg KH, Mauro Carvalho Chehab

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.

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

* Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
       [not found]                       ` <20090420140411.GE8776-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2009-04-20 14:18                         ` Guennadi Liakhovetski
  2009-04-20 14:31                           ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2009-04-20 14:18 UTC (permalink / raw)
  To: Mark Brown
  Cc: Magnus Damm, Linux Media Mailing List, Robert Jarzmik,
	Kuninori Morimoto, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Greg KH,
	Mauro Carvalho Chehab

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/

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

* Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device
  2009-04-20 14:18                         ` Guennadi Liakhovetski
@ 2009-04-20 14:31                           ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2009-04-20 14:31 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Magnus Damm, Linux Media Mailing List, Robert Jarzmik,
	Kuninori Morimoto, linux-i2c, Greg KH, Mauro Carvalho Chehab

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.

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

end of thread, other threads:[~2009-04-20 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.64.0904151356480.4729@axis700.grange>
     [not found] ` <aec7e5c30904170040p6ec1721aj6885ef16573cd484@mail.gmail.com>
     [not found]   ` <Pine.LNX.4.64.0904170950320.5119@axis700.grange>
     [not found]     ` <aec7e5c30904170331n6da85695gdd6da8d6a42eacf1@mail.gmail.com>
     [not found]       ` <Pine.LNX.4.64.0904171235010.5119@axis700.grange>
     [not found]         ` <aec7e5c30904200014n2d8cdcfeud23f2b6b221f9fad@mail.gmail.com>
     [not found]           ` <Pine.LNX.4.64.0904200921090.4403@axis700.grange>
     [not found]             ` <aec7e5c30904200100wb117328sb97ea0262d163547@mail.gmail.com>
     [not found]               ` <Pine.LNX.4.64.0904201010130.4403@axis700.grange>
     [not found]                 ` <aec7e5c30904200154w758e4ecl8174a4cb0bce11f9@mail.gmail.com>
2009-04-20 13:50                   ` v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device Guennadi Liakhovetski
2009-04-20 14:04                     ` Mark Brown
     [not found]                       ` <20090420140411.GE8776-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2009-04-20 14:18                         ` Guennadi Liakhovetski
2009-04-20 14:31                           ` Mark Brown

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