All of lore.kernel.org
 help / color / mirror / Atom feed
From: mgr@pengutronix.de (Michael Grzeschik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: i.MX27 pcm970: Add camera support
Date: Sun, 15 Aug 2010 10:55:32 +0200	[thread overview]
Message-ID: <20100815085532.GA6818@pengutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.64.1008122224070.17224@axis700.grange>

On Thu, Aug 12, 2010 at 10:27:57PM +0200, Guennadi Liakhovetski wrote:
> On Wed, 11 Aug 2010, Michael Grzeschik wrote:
> 
> > On Wed, Aug 11, 2010 at 10:10:38PM +0200, Guennadi Liakhovetski wrote:
> > > On Wed, 11 Aug 2010, Michael Grzeschik wrote:
> > > 
> > > > Adds the glue code for the pcm970 baseboard. It has a power regulator
> > > > which is registered first and instrumented in the power hook of
> > > > soc_camera_link to turn on the power for the camera device.
> > > 
> > > Ok, this looks better now, with this you don't have to patch the driver 
> > > any more. But - are you sure you really need both - the power callback and 
> > > the lateinitcall doing the same - requesting the regulator and enabling 
> > > it. I think, just the power callback should suffice.
> > 
> > Yes, i left it this way because we just need to look for the gpio
> > expander only once. Since the power callback will be called everytime we
> > try to handle a camera, this part of code don't has to be there. With
> > the late_initcall we can leave the power-on-off behaviour of the
> > callback functions simple and as intended. After we initialized all the
> > i2c cameras, we do the final check for the gpio in the late_initcall.
> > For this we again, have to switch power on, look for the expander and
> > power off again, independent of which cameras has been found.
> 
> Do you mean, that your GPIO expander is also powered from the same 
> regulator, as the camera sensor? But you request and enable the regulator 
> in pcm970_baseboard_init_late() and do not disable it there again. Is this 
> required for your expander to preserve the state? I am not familiar with 
> the regulator API - does it count enables and disables? In which case, 
> with the below patch it would stay on permanently?

There is no case for this version of patch in which the power regulator
will stay turned on. Since we trigger the gpio on the expander,
the camera module with the expander on board has to stay turned on.
Otherwise our gpio setting will be lost. I send v3 now. In this version
the regulator will not be turned off again.

Thanks for helping on this,
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 |

  reply	other threads:[~2010-08-15  8:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03  9:20 [PATCH 0/2] Add camera support for i.MX27 Baseboards Michael Grzeschik
2010-08-03  9:20 ` [PATCH 1/2] ARM: i.MX27 pcm970: Add camera support Michael Grzeschik
2010-08-11  7:38   ` [PATCH v2] " Michael Grzeschik
2010-08-11 20:10     ` Guennadi Liakhovetski
2010-08-11 21:07       ` Michael Grzeschik
2010-08-12 20:27         ` Guennadi Liakhovetski
2010-08-15  8:55           ` Michael Grzeschik [this message]
2010-08-15  9:08           ` [PATCH v3] " Michael Grzeschik
2010-08-18 20:05             ` Guennadi Liakhovetski
2010-08-18 20:33               ` Mark Brown
2010-08-18 21:13                 ` Guennadi Liakhovetski
2010-08-18 21:46                   ` Mark Brown
2010-08-03  9:20 ` [PATCH 2/2] ARM: i.MX27 pca100: " 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=20100815085532.GA6818@pengutronix.de \
    --to=mgr@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.