From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/04] ARM: shmobile: r8a73a4 SoC and APE6EVM board support
Date: Thu, 14 Mar 2013 08:59:15 +0000 [thread overview]
Message-ID: <201303140859.16166.arnd@arndb.de> (raw)
In-Reply-To: <CANqRtoQeSqZas7Zdyz-de13_4W_a5P6_xrh_23nKZzZV47xF_w@mail.gmail.com>
On Thursday 14 March 2013, Magnus Damm wrote:
> These patches for new SoCs and boards use a mix of DT and C. In
> practice that means that I plan on using platform devices and DT in
> parallel. These platform devices can easily go away upon your request,
> if so a new version of the patch will be submitted with the offensive
> hunks removed. The old version may however still be used for back
> porting.
Yes, that sounds like a good plan.
> So if there are some portions of the code that you would like me to
> rework then please let me know and I will do my best to follow your
> guidance. I am also open to clean up various portions of the code if
> you have some particular place that you feel needs extra attention.
The only part that confused me was the use of "#ifdef CONFIG_USE_OF"
in the setup-r8a73a4.c file. If the plan is to use a combination of
DT with static platform_data (or platform_devices, more on that below),
you always need that conditional code, and I think it would be more
logical to remove the #ifdef. I understand that having the #ifdef
in place makes your life easier for backporting to kernels that
don't have enough DT support yet, but I think you are going to run
into larger issues tha this the more those divert from current
mainline over time.
Regarding how to best mix platform devices and DT, my recommendation
is to use AUXDATA for the platform_data and device names while getting
the IRQ and MMIO resources from DT for devices that have no binding
yet, rather than creating the complete device in platform code. In
particular, this should make it easier to deal with IRQ domains, and
with devices that are disabled on some boards, but again it will make
you backporting more work.
Regarding how platform devices are created, Greg KH has been trying
to stop people from statically declaring the devices in platform code
for many years, the recommended way to do it (if you have to) is calling
one of platform_device_register_{full,resndata,data,simple}. We still
have a large number of static platform devices in ARM, and I'm not
asking anyone to actively convert the existing ones, but I should
probably be a little stricter about using the proper interfaces in
new code.
To summarize, the many ways to create platform devices from most
preferred to least are:
1. DT without auxdata
2. DT with auxdata
3. platform_device_register_*
4. static definition with platform_device_register
Arnd
prev parent reply other threads:[~2013-03-14 8:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 4:55 [PATCH 00/04] ARM: shmobile: r8a73a4 SoC and APE6EVM board support Magnus Damm
2013-03-12 4:56 ` [PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support Magnus Damm
2013-03-12 12:25 ` Arnd Bergmann
2013-03-14 7:44 ` Magnus Damm
2013-03-14 9:06 ` Arnd Bergmann
2013-03-19 3:22 ` Magnus Damm
2013-03-22 16:03 ` Arnd Bergmann
2013-03-12 4:56 ` [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support Magnus Damm
2013-03-12 4:56 ` [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support Magnus Damm
2013-03-12 12:31 ` Arnd Bergmann
2013-03-14 6:59 ` Magnus Damm
2013-03-14 13:43 ` Arnd Bergmann
2013-03-15 5:32 ` Magnus Damm
2013-03-22 16:00 ` Arnd Bergmann
2013-03-12 4:56 ` [PATCH 04/04] ARM: shmobile: APE6EVM support Magnus Damm
2013-03-12 7:51 ` Kuninori Morimoto
2013-03-12 7:57 ` Magnus Damm
2013-03-12 12:16 ` Arnd Bergmann
2013-03-14 7:01 ` Magnus Damm
2013-03-12 5:19 ` [PATCH 00/04] ARM: shmobile: r8a73a4 SoC and APE6EVM board support Kuninori Morimoto
2013-03-12 12:28 ` Arnd Bergmann
2013-03-14 7:28 ` Magnus Damm
2013-03-14 8:59 ` Arnd Bergmann [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=201303140859.16166.arnd@arndb.de \
--to=arnd@arndb.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 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).