All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Michael Grzeschik <mgr@pengutronix.de>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	baruch@tkos.co.il, Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 1/5] mx2_camera: change to register and probe
Date: Tue, 10 Aug 2010 21:08:11 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1008102050580.18934@axis700.grange> (raw)
In-Reply-To: <20100810102536.GA13418@pengutronix.de>

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/

  reply	other threads:[~2010-08-10 19:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03  9:37 [PATCH 0/5] mx2_camera changes and corrections Michael Grzeschik
2010-08-03  9:37 ` [PATCH 1/5] mx2_camera: change to register and probe Michael Grzeschik
2010-08-03 18:22   ` Guennadi Liakhovetski
2010-08-03 19:57     ` Michael Grzeschik
2010-08-03 23:01       ` Guennadi Liakhovetski
2010-08-04  7:09         ` Sascha Hauer
2010-08-04  8:24           ` Guennadi Liakhovetski
2010-08-04  8:53             ` Michael Grzeschik
2010-08-04  9:48               ` Guennadi Liakhovetski
2010-08-05 20:17   ` Guennadi Liakhovetski
2010-08-10 10:25     ` Michael Grzeschik
2010-08-10 19:08       ` Guennadi Liakhovetski [this message]
2010-08-11  7:13         ` Michael Grzeschik
2010-08-03  9:37 ` [PATCH 2/5] mx2_camera: remove emma limitation for RGB565 Michael Grzeschik
2010-08-04  9:55   ` Guennadi Liakhovetski
2010-08-04 10:27     ` Michael Grzeschik
2010-08-05 19:25       ` Guennadi Liakhovetski
2010-08-09 14:22         ` [PATCH v2] " Michael Grzeschik
2010-08-09 14:57         ` [PATCH v2][RESEND] " Michael Grzeschik
2010-08-03  9:37 ` [PATCH 3/5] mx2_camera: fix for list bufnum in frame_done_emma Michael Grzeschik
2010-08-03  9:37 ` [PATCH 4/5] mx2_camera: add rising edge for pixclock Michael Grzeschik
2010-08-03  9:37 ` [PATCH 5/5] mx2_camera: add informative camera clock frequency printout Michael Grzeschik
2010-08-05 20:30   ` Guennadi Liakhovetski
2010-08-05 20:54     ` Michael Grzeschik
2010-08-27  9:46       ` Guennadi Liakhovetski
2010-08-27 12:39   ` [PATCH v2] " Michael Grzeschik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1008102050580.18934@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=baruch@tkos.co.il \
    --cc=linux-media@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=mgr@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.