[U-Boot] [PATCH v3 13/72] dm: core: Add device-based 'read' functions to access DT

sjg at google.com sjg at google.com
Thu May 25 00:06:59 UTC 2017


It is common to read a device-tree property from the node associated with
a device. Add convenience functions to do this so that drivers do not need
to deal with accessing the ofnode from the device.

These functions all start with 'dev_read_' to provide consistent naming
for all functions which read information from a device's device tree node.

These are inlined when using the flat DT to save code size. The live tree
implementation is added in a later commit.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3: None
Changes in v2: None

 drivers/core/Kconfig |   4 +
 include/dm/read.h    | 383 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 387 insertions(+)
 create mode 100644 include/dm/read.h

Applied to u-boot-dm


More information about the U-Boot mailing list