linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: pxa: PalmZ72: Add OV9640 camera support
Date: Sat, 15 Jan 2011 21:08:12 +0100	[thread overview]
Message-ID: <201101152108.12564.marek.vasut@gmail.com> (raw)
In-Reply-To: <AANLkTi=ks1DWPd4ahKGovtq3SJj6yO_Bs7D9Nd-exvUk@mail.gmail.com>

On Saturday 15 January 2011 19:58:39 Bj?rn Forsman wrote:
> 2011/1/15 Marek Vasut <marek.vasut@gmail.com>:
> > On Saturday 15 January 2011 18:49:16 Bj?rn Forsman wrote:
> >> 2011/1/15 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> >> > On Sat, Jan 15, 2011 at 05:37:08PM +0100, Bj?rn Forsman wrote:
> >> >> Hi,
> >> >> 
> >> >> On 15 January 2011 02:17, Marek Vasut <marek.vasut@gmail.com> wrote:
> >> >> > Rework of patch from 2009:
> >> >> > PalmZ72: Add support for OV9640 camera sensor
> >> >> > 
> >> >> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> >> >> > ---
> >> >> > v2: Use gpio_request_array()/gpio_free_array() array
> >> >> > 
> >> >> >  arch/arm/mach-pxa/include/mach/palmz72.h |    5 +
> >> >> >  arch/arm/mach-pxa/palmz72.c              |  127
> >> >> > ++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+),
> >> >> > 0 deletions(-)
> >> >> > 
> >> >> > diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h
> >> >> > b/arch/arm/mach-pxa/include/mach/palmz72.h index 2bbcf70..0d4700a
> >> >> > 100644
> >> >> > --- a/arch/arm/mach-pxa/include/mach/palmz72.h
> >> >> > +++ b/arch/arm/mach-pxa/include/mach/palmz72.h
> >> >> 
> >> >> [snip]
> >> >> 
> >> >> > +static int palmz72_camera_power(struct device *dev, int power)
> >> >> > +{
> >> >> > +       gpio_set_value(GPIO_NR_PALMZ72_CAM_PWDN, !power);
> >> >> > +       mdelay(50);
> >> >> > +       return 0;
> >> >> > +}
> >> >> > +
> >> >> > +static int palmz72_camera_reset(struct device *dev)
> >> >> > +{
> >> >> > +       gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 1);
> >> >> > +       mdelay(50);
> >> >> > +       gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 0);
> >> >> > +       mdelay(50);
> >> >> > +       return 0;
> >> >> > +}
> >> >> 
> >> >> (Sorry if these are stupid newbie-questions.)
> >> >> 
> >> >> Is the entire kernel blocked during the above mdelay()s or
> >> >> just some kernel thread? (Or: will this add like 100ms or 150ms
> >> >> to boot time?)
> >> >> 
> >> >> Can mdelay() be replaced with something non-blocking?
> >> > 
> >> > mdelay() is a spinning delay - it doesn't voluntarily relinquish the
> >> > CPU to another task.
> >> > 
> >> > If you have preempt enabled and the region is preemptable, you can be
> >> > preempted in the middle of the delay (in which case it becomes delay
> >> > time + time away from the thread.)
> >> > 
> >> > msleep() can be used for places where you can sleep, but is limited to
> >> > the jiffy granularity for !HIRES kernels.
> >> 
> >> Thanks for explaining!
> >> 
> >> Marek, care to try msleep() so we avoid busy-waits?
> > 
> > Let's keep it at mdelay() for now, can we? I'll send a subsequent patch
> > once I can test with msleep() ... I don't have the hardware available
> > now.
> 
> Sure. It was only a suggestion :-)

It's actually very valid, I'll keep that in mind :)
> 
> Best regards,
> Bj?rn Forsman

      reply	other threads:[~2011-01-15 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15  1:17 [PATCH v2] ARM: pxa: PalmZ72: Add OV9640 camera support Marek Vasut
2011-01-15 16:37 ` Bjørn Forsman
2011-01-15 17:08   ` Russell King - ARM Linux
2011-01-15 17:49     ` Bjørn Forsman
2011-01-15 18:41       ` Marek Vasut
2011-01-15 18:58         ` Bjørn Forsman
2011-01-15 20:08           ` Marek Vasut [this message]

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=201101152108.12564.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).