From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] kbuild: create an "include chroot" for DT bindings
Date: Fri, 22 Feb 2013 11:11:15 -0700 [thread overview]
Message-ID: <5127B4C3.8070001@wwwdotorg.org> (raw)
In-Reply-To: <20130222023526.GA27371@S2101-09.ap.freescale.net>
On 02/21/2013 07:35 PM, Shawn Guo wrote:
> On Thu, Feb 21, 2013 at 11:43:13AM -0700, Stephen Warren wrote:
>> There are two things that include DT-related headers:
>>
>> a) Device trees (*.dts, *.dtsi)
>> b) The kernel
>>
>> All the headers relevant here fall into category (a) by definition. I'd
>> actually expect most to also fall into category (b), although I can see
>> that category (b) might be a strict subset of category (a).
>>
>> I believe you're proposing only storing category (b) headers in
>> include/dt-bindings/, and storing any others I suppose in arch/*/boot/dts/.
>>
>> But, my thoughts are that /all/ these headers (both categories) should
>> be stored in one place for consistency.
>>
>> That way, if/when the DT binding docs, these headers, and the DT files
>> themselves move out of the kernel, we'll end up with some other
>> repository/repositories that might have the following top-level
>> directories (or at least these sets of logical data):
>>
>> 1) DT binding documents
>> 2) Headers that define constants for (1)
>> 3) DT files (*.dts/*.dtsi)
>>
>> We need at least some of (2) in the kernel for drivers to share the
>> constant definitions, so my proposal is to simply copy /all/ the headers
>> from (2) into the kernel's include/dt-bindings/. That keeps things
>> simple; simply copy everything and maintain the same hierarchy under
>> that "root" directory. Otherwise, we'll be constantly wondering which
>> headers to copy, perhaps moving things back/forth as people realize that
>> the kernel needs them, etc.
>
> You need to anyway identify the headers needed by a) but not b) and
> remove them from linux/include/dt-bindings/, when all DTS gets moved
> out of kernel tree. Otherwise, you end up leaving those headers only
> needed by DTS in the kernel tree.
Well that's really my point - do you actually /need/ to do that?
What headers would be in (b) but not (a)? We'd typically be defining
headers for the purpose of defining constants that are part of the
binding definitions. To keep the kernel and binding documents in sync,
the kernel should have access to any such header. Hence, I think the set
of headers only in (a) would be non-existent. Even if there are some,
presumably there would be so few it wouldn't actually matter if we
weeded them out.
The only exception I can think of right now is the header for the i.MX
pinctrl bindings, since that's expanding the names into a set of values
the kernel will use directly rather than as needing to use as table
indices. I'm not sure if that's the right way to go on the bindings; I
see you're getting some pushback. But, I guess "pinctrl-simple" would
end up in the same boat, so perhaps there's some argument for not
removing boot/dts/ itself from the include path.
next prev parent reply other threads:[~2013-02-22 18:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 21:05 [PATCH] kbuild: create an "include chroot" for DT bindings Stephen Warren
2013-02-21 4:37 ` Shawn Guo
2013-02-21 18:43 ` Stephen Warren
2013-02-22 2:35 ` Shawn Guo
2013-02-22 18:11 ` Stephen Warren [this message]
2013-02-21 22:26 ` Michal Marek
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=5127B4C3.8070001@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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