From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [media] staging: allow omap4iss to be modular
Date: Thu, 12 Jun 2014 16:52:10 +0200 [thread overview]
Message-ID: <2207210.T6NoNSQSCo@avalon> (raw)
In-Reply-To: <20140611144754.GA17845@atomide.com>
Hi Tony,
On Wednesday 11 June 2014 07:47:54 Tony Lindgren wrote:
> * Arnd Bergmann <arnd@arndb.de> [140611 07:37]:
> > The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
> > of which can be loadable modules. This causes build failures
> > if we want the camera driver to be built-in.
>
> That's good news, but let's not fix it this way.
>
> > This can be solved by turning the option into "tristate",
> > which unfortunately causes another problem, because the
> > driver incorrectly calls a platform-internal interface
> > for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.
> > To work around that, we can export those symbols, but
> > that isn't really the correct solution, as we should not
> > have dependencies on platform code this way.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > This is one of just two patches we currently need to get
> > 'make allmodconfig' to build again on ARM.
> >
> > diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
> > index 751f354..05d2d98 100644
> > --- a/arch/arm/mach-omap2/control.c
> > +++ b/arch/arm/mach-omap2/control.c
> > @@ -190,11 +190,13 @@ u32 omap4_ctrl_pad_readl(u16 offset)
> > {
> > return readl_relaxed(OMAP4_CTRL_PAD_REGADDR(offset));
> > }
> > +EXPORT_SYMBOL_GPL(omap4_ctrl_pad_readl);
> >
> > void omap4_ctrl_pad_writel(u32 val, u16 offset)
> > {
> > writel_relaxed(val, OMAP4_CTRL_PAD_REGADDR(offset));
> > }
> > +EXPORT_SYMBOL_GPL(omap4_ctrl_pad_writel);
> >
> > #ifdef CONFIG_ARCH_OMAP3
>
> Exporting these will likely cause immediate misuse in other
> drivers all over the place.
>
> These should just use either pinctrl-single.c instead for muxing.
> Or if they are not mux registers, we do have the syscon mapping
> available in omap4.dtsi that pbias-regulator.c is already using.
>
> Laurent, got any better ideas?
The ISS driver needs to write a single register, which contains several
independent fields. They thus need to be controlled by a single driver. Some
of them might be considered to be related to pinmuxing (although I disagree on
that), others are certainly not about muxing (there are clock gate bits for
instance).
Using the syscon mapping seems like the best option. I'll give it a try.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-06-12 14:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 14:35 [PATCH] [media] staging: allow omap4iss to be modular Arnd Bergmann
2014-06-11 14:42 ` Nishanth Menon
2014-06-11 14:49 ` Arnd Bergmann
2014-06-11 14:53 ` Nishanth Menon
2014-06-11 15:02 ` Tony Lindgren
2014-06-12 14:12 ` Laurent Pinchart
2014-06-12 14:15 ` Arnd Bergmann
2014-06-12 14:25 ` Greg KH
2014-06-12 14:28 ` Arnd Bergmann
2014-06-12 15:00 ` Laurent Pinchart
2014-06-12 15:59 ` Greg KH
2014-06-11 14:47 ` Tony Lindgren
2014-06-12 14:52 ` Laurent Pinchart [this message]
2014-06-12 15:15 ` Tony Lindgren
2014-06-12 15:31 ` Laurent Pinchart
2014-06-13 5:30 ` Tony Lindgren
2014-06-13 6:47 ` Laurent Pinchart
2014-06-13 7:53 ` Tony Lindgren
2014-06-13 10:29 ` Laurent Pinchart
2014-06-13 11:10 ` Tony Lindgren
2014-06-13 13:17 ` Laurent Pinchart
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=2207210.T6NoNSQSCo@avalon \
--to=laurent.pinchart@ideasonboard.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).