Lines Matching refs:node
22 static phandle __init olpc_dt_getsibling(phandle node) in olpc_dt_getsibling() argument
24 const void *args[] = { (void *)node }; in olpc_dt_getsibling()
25 void *res[] = { &node }; in olpc_dt_getsibling()
27 if ((s32)node == -1) in olpc_dt_getsibling()
30 if (olpc_ofw("peer", args, res) || (s32)node == -1) in olpc_dt_getsibling()
33 return node; in olpc_dt_getsibling()
36 static phandle __init olpc_dt_getchild(phandle node) in olpc_dt_getchild() argument
38 const void *args[] = { (void *)node }; in olpc_dt_getchild()
39 void *res[] = { &node }; in olpc_dt_getchild()
41 if ((s32)node == -1) in olpc_dt_getchild()
44 if (olpc_ofw("child", args, res) || (s32)node == -1) { in olpc_dt_getchild()
49 return node; in olpc_dt_getchild()
52 static int __init olpc_dt_getproplen(phandle node, const char *prop) in olpc_dt_getproplen() argument
54 const void *args[] = { (void *)node, prop }; in olpc_dt_getproplen()
58 if ((s32)node == -1) in olpc_dt_getproplen()
69 static int __init olpc_dt_getproperty(phandle node, const char *prop, in olpc_dt_getproperty() argument
74 plen = olpc_dt_getproplen(node, prop); in olpc_dt_getproperty()
78 const void *args[] = { (void *)node, prop, buf, (void *)plen }; in olpc_dt_getproperty()
90 static int __init olpc_dt_nextprop(phandle node, char *prev, char *buf) in olpc_dt_nextprop() argument
92 const void *args[] = { (void *)node, prev, buf }; in olpc_dt_nextprop()
98 if ((s32)node == -1) in olpc_dt_nextprop()
107 static int __init olpc_dt_pkg2path(phandle node, char *buf, in olpc_dt_pkg2path() argument
110 const void *args[] = { (void *)node, buf, (void *)buflen }; in olpc_dt_pkg2path()
113 if ((s32)node == -1) in olpc_dt_pkg2path()
168 phandle node; in olpc_dt_finddevice() local
170 void *res[] = { &node }; in olpc_dt_finddevice()
177 if ((s32) node == -1) in olpc_dt_finddevice()
180 return node; in olpc_dt_finddevice()
203 phandle node; in olpc_dt_get_board_revision() local
207 node = olpc_dt_finddevice("/"); in olpc_dt_get_board_revision()
208 if (!node) in olpc_dt_get_board_revision()
211 r = olpc_dt_getproperty(node, "board-revision-int", in olpc_dt_get_board_revision()
219 static int __init olpc_dt_compatible_match(phandle node, const char *compat) in olpc_dt_compatible_match() argument
224 plen = olpc_dt_getproperty(node, "compatible", buf, sizeof(buf)); in olpc_dt_compatible_match()
239 phandle node; in olpc_dt_fixup() local
242 node = olpc_dt_finddevice("/battery@0"); in olpc_dt_fixup()
243 if (!node) in olpc_dt_fixup()
253 if (olpc_dt_compatible_match(node, "olpc,xo1.5-battery")) in olpc_dt_fixup()
261 if (olpc_dt_compatible_match(node, "olpc,xo1-battery")) { in olpc_dt_fixup()
280 if (olpc_dt_compatible_match(node, "olpc,xo1-battery")) { in olpc_dt_fixup()