Re: [PATCH 1/5] mx2_camera: change to register and probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Guennadi,

On Tue, Aug 10, 2010 at 09:08:11PM +0200, Guennadi Liakhovetski wrote:
> On Tue, 10 Aug 2010, Michael Grzeschik wrote:
> 
> > Hi Guennadi,
> > 
> > On Thu, Aug 05, 2010 at 10:17:11PM +0200, Guennadi Liakhovetski wrote:
> > > On Tue, 3 Aug 2010, Michael Grzeschik wrote:
> > > 
> > > > change this driver back to register and probe, since some platforms
> > > > first have to initialize an already registered power regulator to switch
> > > > on the camera.
> > > 
> > > I shall be preparing a pull-request for 2.6.36-rc1 #2, but since we 
> > > haven't finished discussing this and when this is ready, this will be a 
> > > fix - without this your platform doesn't work, right? So, we can push it 
> > > after rc1.
> > 
> > The issue is, that we cannot change the platform code from the
> > late_initcall structure. For me there is no other solution than that,
> > because we have to enable the regulator before the camera chip to
> > communicate over i2c. If we would move to the notify way we would
> > first listen for the i2c enabled clients but for that we would still
> > have to first enable the regulator. At this moment i don't see a
> > solution in this way.
> 
> Hm, I think, there is an easier way to do this: just use the .power() 
> callback from struct soc_camera_link. It is called for the first time 
> before the camera is added to the i2c bus, so, before any IO is taking 
> place. Just be careful to make sure you don't call one-time init actions 
> (like gpio_request()) multiple times - .power is called also later again 
> upon each open / close. So, you'll need some flag to detect the very first 
> power-on.

this seems for me to be the best solution so far. At this time i have a
patched version (v2) for my pcm970-baseboard.c glue code. I will send it
ASOP, so this "change back to probe and register patch" is not needed
anymore.

> Sorry, for keeping on my attempts to avoid your patch - it really seems to 
> me, a better solution is possible.
Good thoughts!

Thanks for the hints,
Michael

-- 
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 |
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux