All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: martin@neutronstar.dyndns.org
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org, linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] arm: omap3evm: Add support for an MT9M032 based camera board.
Date: Mon, 19 Sep 2011 10:01:12 +0200	[thread overview]
Message-ID: <201109191001.12364.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20110919061019.GD9244@neutronstar.dyndns.org>

Hi Martin,

On Monday 19 September 2011 08:10:19 martin@neutronstar.dyndns.org wrote:
> On Sun, Sep 18, 2011 at 11:58:55PM +0200, Laurent Pinchart wrote:
> > On Saturday 17 September 2011 11:34:57 Martin Hostettler wrote:
> > > Adds board support for an MT9M032 based camera to omap3evm.
> > > 
> > > Sigend-off-by: Martin Hostettler <martin@neutronstar.dyndns.org>
> > > ---
> > > 
> > >  arch/arm/mach-omap2/Makefile                |    1 +
> > >  arch/arm/mach-omap2/board-omap3evm-camera.c |  183
> > > 
> > > +++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 0
> > > deletions(-)
> > > 
> > >  create mode 100644 arch/arm/mach-omap2/board-omap3evm-camera.c
> > > 
> > > Changes in V2:
> > >  * ported to current mainline
> > >  * Style fixes
> > >  * Fix error handling
> > > 
> > > diff --git a/arch/arm/mach-omap2/Makefile
> > > b/arch/arm/mach-omap2/Makefile index f343365..8ae3d25 100644
> > > --- a/arch/arm/mach-omap2/Makefile
> > > +++ b/arch/arm/mach-omap2/Makefile
> > > +	return 0;
> > > +
> > > +err_8:
> > > +	gpio_free(EVM_TWL_GPIO_BASE + 8);
> > > +err_2:
> > > +	gpio_free(EVM_TWL_GPIO_BASE + 2);
> > > +err_vdsel:
> > > +	gpio_free(nCAM_VD_SEL);
> > > +err:
> > > +	return ret;
> > > +}
> > > +
> > > +device_initcall(camera_init);
> > 
> > Please don't use device_initcall(), but call the function directly from
> > the OMAP3 EVM init handler. Otherwise camera_init() will be called if
> > OMAP3 EVM support is compiled in the kernel, regardless of the board the
> > kernel runs on.
> 
> Ok, will do.
> In which header should the prototyp of that function go? Or can i just
> add a prototyp to board-omap3evm.c directly?
> I couldn't find anything that looked right, this is rather board specific
> after all.

You can either create arch/arm/mach-omap2/board-omap3evm.h or add the 
prototype to board-omap3evm.c.

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: omap3evm: Add support for an MT9M032 based camera board.
Date: Mon, 19 Sep 2011 10:01:12 +0200	[thread overview]
Message-ID: <201109191001.12364.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20110919061019.GD9244@neutronstar.dyndns.org>

Hi Martin,

On Monday 19 September 2011 08:10:19 martin at neutronstar.dyndns.org wrote:
> On Sun, Sep 18, 2011 at 11:58:55PM +0200, Laurent Pinchart wrote:
> > On Saturday 17 September 2011 11:34:57 Martin Hostettler wrote:
> > > Adds board support for an MT9M032 based camera to omap3evm.
> > > 
> > > Sigend-off-by: Martin Hostettler <martin@neutronstar.dyndns.org>
> > > ---
> > > 
> > >  arch/arm/mach-omap2/Makefile                |    1 +
> > >  arch/arm/mach-omap2/board-omap3evm-camera.c |  183
> > > 
> > > +++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 0
> > > deletions(-)
> > > 
> > >  create mode 100644 arch/arm/mach-omap2/board-omap3evm-camera.c
> > > 
> > > Changes in V2:
> > >  * ported to current mainline
> > >  * Style fixes
> > >  * Fix error handling
> > > 
> > > diff --git a/arch/arm/mach-omap2/Makefile
> > > b/arch/arm/mach-omap2/Makefile index f343365..8ae3d25 100644
> > > --- a/arch/arm/mach-omap2/Makefile
> > > +++ b/arch/arm/mach-omap2/Makefile
> > > +	return 0;
> > > +
> > > +err_8:
> > > +	gpio_free(EVM_TWL_GPIO_BASE + 8);
> > > +err_2:
> > > +	gpio_free(EVM_TWL_GPIO_BASE + 2);
> > > +err_vdsel:
> > > +	gpio_free(nCAM_VD_SEL);
> > > +err:
> > > +	return ret;
> > > +}
> > > +
> > > +device_initcall(camera_init);
> > 
> > Please don't use device_initcall(), but call the function directly from
> > the OMAP3 EVM init handler. Otherwise camera_init() will be called if
> > OMAP3 EVM support is compiled in the kernel, regardless of the board the
> > kernel runs on.
> 
> Ok, will do.
> In which header should the prototyp of that function go? Or can i just
> add a prototyp to board-omap3evm.c directly?
> I couldn't find anything that looked right, this is rather board specific
> after all.

You can either create arch/arm/mach-omap2/board-omap3evm.h or add the 
prototype to board-omap3evm.c.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2011-09-19  8:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17  9:34 [PATCH v2] arm: omap3evm: Add support for an MT9M032 based camera board Martin Hostettler
2011-09-17  9:34 ` Martin Hostettler
2011-09-17 20:24 ` Joe Perches
2011-09-17 20:24   ` Joe Perches
2011-09-18 20:10   ` martin
2011-09-18 20:10     ` martin at neutronstar.dyndns.org
2011-09-17 22:00 ` Sylwester Nawrocki
2011-09-17 22:00   ` Sylwester Nawrocki
2011-09-17 22:08   ` Laurent Pinchart
2011-09-17 22:08     ` Laurent Pinchart
2011-09-18 20:13     ` martin
2011-09-18 20:13       ` martin at neutronstar.dyndns.org
2011-09-18 21:58 ` Laurent Pinchart
2011-09-18 21:58   ` Laurent Pinchart
2011-09-19  6:07   ` Hiremath, Vaibhav
2011-09-19  6:07     ` Hiremath, Vaibhav
2011-09-19 19:24     ` martin
2011-09-19 19:24       ` martin at neutronstar.dyndns.org
2011-09-19 19:24       ` martin
2011-09-19 19:59       ` Hiremath, Vaibhav
2011-09-19 19:59         ` Hiremath, Vaibhav
2011-09-19  6:10   ` martin
2011-09-19  6:10     ` martin at neutronstar.dyndns.org
2011-09-19  8:01     ` Laurent Pinchart [this message]
2011-09-19  8:01       ` Laurent Pinchart
2011-09-19 19:17   ` Guennadi Liakhovetski
2011-09-19 19:17     ` Guennadi Liakhovetski

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=201109191001.12364.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=martin@neutronstar.dyndns.org \
    --cc=tony@atomide.com \
    /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.