From 405552399f9ce4fa14a791eb8b84baba2c87963d Mon Sep 17 00:00:00 2001 From: Burt P Date: Wed, 19 Jul 2017 03:30:43 -0500 Subject: 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 --- includes/dt_util.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'includes/dt_util.h') 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 /* 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, /* */ + DTP_GPIOS, /* */ }; /* 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); -- cgit v1.2.3