aboutsummaryrefslogtreecommitdiff
path: root/includes/dt_util.h
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-19 03:30:43 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-19 07:20:40 -0700
commit405552399f9ce4fa14a791eb8b84baba2c87963d (patch)
tree14e628e34103f498b1353ef565f328f26867d135 /includes/dt_util.h
parentebae0e55eedcb286d092a1831d996dcf93151869 (diff)
device tree: fixes
* /aliases/* and /__symbols/* are always strings * phandle ref element bug fix, re-enabled phandle refs * notes on a few more property types Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'includes/dt_util.h')
-rw-r--r--includes/dt_util.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/dt_util.h b/includes/dt_util.h
index 95373c00..18de6094 100644
--- a/includes/dt_util.h
+++ b/includes/dt_util.h
@@ -5,7 +5,7 @@
#include <stdint.h>
/* some not-quite-complete stuff that can be disabled */
-#define DTEX_PHREFS 0
+#define DTEX_PHREFS 1
#ifndef DTR_ROOT
#define DTR_ROOT "/proc/device-tree"
@@ -23,6 +23,9 @@ enum {
/* DTP_INT, */
DTP_PH, /* phandle */
DTP_PH_REF, /* reference to phandle */
+ DTP_REG, /* <#address-cells, #size-cells> */
+ DTP_CLOCKS, /* <phref, #clock-cells> */
+ DTP_GPIOS, /* <phref, #gpio-cells> */
};
/* simplest, no aliases.
@@ -56,7 +59,7 @@ uint32_t dtr_get_prop_u32(dtr *, dtr_obj *node, const char *name);
char* dtr_str(dtr_obj *obj);
int dtr_guess_type(dtr_obj *obj);
-char *dtr_elem_phref(dtr *, dt_uint e);
+char *dtr_elem_phref(dtr *, dt_uint e, int show_path);
char *dtr_elem_hex(dt_uint e);
char *dtr_elem_byte(uint8_t e);
char *dtr_elem_uint(dt_uint e);