From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: DT include files
Date: Sat, 11 Jan 2014 14:15:28 +0100 [thread overview]
Message-ID: <201401111415.29395.arnd@arndb.de> (raw)
In-Reply-To: <20140111031214.GK21717@S2101-09.ap.freescale.net>
On Saturday 11 January 2014, Shawn Guo wrote:
> While I agree such macro usage should be avoided or limited, it really
> helps IMX pinctrl case to improve the readability and make the handwriting
> of these pinctrl entries less error prone. Isn't it the whole point of
> introducing macro support for DTC?
The macros are useful for all cases where the binding defines an
arbitrary number space, e.g. for the interrupt flags or when a
clock or pin controller provides a set of pins/clocks that don't
already have a number assigned to them. In this case, the header
file can be shared between the dts and kernel source files to ensure
that they are talking about the same things.
However, I don't like to see uses of such macros where the definition
is done to match a hardware constant (bit number, register index, etc),
like in the recently posted eDMA driver case. Here the macro /reduces/
readability of the dts source IMHO, because you cannot easily check
the dts file against the data sheet without cross-referencing the
header file as well.
Arnd
next prev parent reply other threads:[~2014-01-11 13:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 5:44 [GIT PULL 2/2] ARM: imx: device tree changes for 3.14 Shawn Guo
2014-01-02 20:21 ` DT include files (was: [GIT PULL 2/2] ARM: imx: device tree changes for 3.14) Olof Johansson
2014-01-03 2:32 ` Shawn Guo
2014-01-03 2:41 ` Olof Johansson
2014-01-03 3:04 ` Shawn Guo
2014-01-03 19:29 ` Olof Johansson
2014-01-04 1:10 ` Shawn Guo
2014-01-10 2:41 ` Shawn Guo
2014-01-10 2:41 ` Olof Johansson
2014-01-10 13:28 ` DT include files Tomasz Figa
2014-01-10 15:30 ` Rob Herring
2014-01-10 17:03 ` Gerhard Sittig
2014-01-13 16:48 ` Stephen Warren
2014-01-13 18:10 ` Gerhard Sittig
2014-01-10 18:37 ` Olof Johansson
2014-01-11 3:12 ` Shawn Guo
2014-01-11 13:15 ` Arnd Bergmann [this message]
2014-01-12 3:25 ` Shawn Guo
2014-01-12 20:21 ` Arnd Bergmann
2014-01-12 23:16 ` Linus Walleij
2014-01-13 2:31 ` Shawn Guo
2014-01-13 2:19 ` Shawn Guo
2014-01-24 8:02 ` Heiko Stübner
2014-01-25 2:25 ` Shawn Guo
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=201401111415.29395.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).