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

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

 



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.

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

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 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