From f11c7ab94d2db2cce3601cdbcb4f6208f2a0bee4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 18 May 2017 20:09:03 -0600 Subject: dm: core: Add device-based 'read' functions to access DT 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 --- drivers/core/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/core') diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 405e9ad8efc..fb5c4e834d6 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -215,4 +215,8 @@ config OF_ISA_BUS mistranslation of device addresses, so ensure that this is enabled if your board does include an ISA bus. +config DM_DEV_READ_INLINE + bool + default y if !OF_LIVE + endmenu -- cgit v1.3.1