From: Arnd Bergmann <arnd@arndb.de>
To: "Par-Gunnar HJALMDAHL" <par-gunnar.p.hjalmdahl@stericsson.com>
Cc: Greg KH <gregkh@suse.de>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Pavan Savoy <pavan_savoy@sify.com>,
Vitaly Wool <vitalywool@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcel Holtmann <marcel@holtmann.org>,
Lukasz Rymanowski <Lukasz.Rymanowski@tieto.com>,
Linus WALLEIJ <linus.walleij@stericsson.com>,
"Par-Gunnar Hjalmdahl" <pghatwork@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH v2 2/2] mach-ux500: Add CG2900 devices
Date: Mon, 28 Mar 2011 16:47:48 +0200 [thread overview]
Message-ID: <201103281647.48802.arnd@arndb.de> (raw)
In-Reply-To: <AFCDDB4A3EA003429EEF1E7B211FDBBA3377B51A1F@EXDCVYMBSTM005.EQ1STM.local>
On Monday 28 March 2011, Par-Gunnar HJALMDAHL wrote:
> But how should I then do this? As I understood it I was told that I should
> call an init function, but I was not allowed to add any staging folder
> inclusion in the board config makefile. And now I can't do any extern
> declaration either. I don't really see how I could do it then.
>
> The only thing I can think of is to use platform device and driver for
> the cg2900_init. But I wouldn't call that to call an init-function, but that
> might be OK for this purpose?
There are at least two ways to do it:
* As Linus Walleij explained, use an initcall instead of calling a
function from the board init code. "initcall" here refers to the
interfaces from include/linux/init.h, e.g. module_init(). This
will result in the function getting called at module load time,
or at some point during bootup when it's built into the kernel.
This initcall needs to check if you are running on the right board,
using machine_is_xxx().
* As I explained, register a simple platform_device with the resources
for the entire cg2900 device from the board code in a way that
is independent of the actual driver. The driver code can then
register all the subdevices from the cg2900_probe function.
The code in the architecture would consist out of a single
call to platform_device_register_simple() plus the resources.
Either way is fine with me.
Arnd
next prev parent reply other threads:[~2011-03-28 14:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 9:03 [PATCH v2 2/2] mach-ux500: Add CG2900 devices Par-Gunnar Hjalmdahl
2011-03-28 13:00 ` Arnd Bergmann
2011-03-28 14:12 ` Greg KH
2011-03-28 14:29 ` Par-Gunnar HJALMDAHL
2011-03-28 14:39 ` Greg KH
2011-03-28 14:59 ` Arnd Bergmann
2011-03-28 14:47 ` Arnd Bergmann [this message]
2011-03-28 14:40 ` Vitaly Wool
2011-03-28 14:49 ` Arnd Bergmann
2011-03-29 6:20 ` Par-Gunnar HJALMDAHL
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=201103281647.48802.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Lukasz.Rymanowski@tieto.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mathieu.poirier@linaro.org \
--cc=par-gunnar.p.hjalmdahl@stericsson.com \
--cc=pavan_savoy@sify.com \
--cc=pghatwork@gmail.com \
--cc=vitalywool@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox