Lines Matching defs:node

20 static phandle prom_node_to_node(const char *type, phandle node)
27 args[3] = (unsigned int) node;
35 /* Return the child of node 'node' or zero if no this node has no
38 inline phandle __prom_getchild(phandle node)
40 return prom_node_to_node("child", node);
43 phandle prom_getchild(phandle node)
47 if ((s32)node == -1)
49 cnode = __prom_getchild(node);
56 inline phandle prom_getparent(phandle node)
60 if ((s32)node == -1)
62 cnode = prom_node_to_node("parent", node);
68 /* Return the next sibling of node 'node' or zero if no more siblings
71 inline phandle __prom_getsibling(phandle node)
73 return prom_node_to_node(prom_peer_name, node);
76 phandle prom_getsibling(phandle node)
80 if ((s32)node == -1)
82 sibnode = __prom_getsibling(node);
90 /* Return the length in bytes of property 'prop' at node 'node'.
93 int prom_getproplen(phandle node, const char *prop)
97 if (!node || !prop)
103 args[3] = (unsigned int) node;
113 /* Acquire a property 'prop' at node 'node' and place it in
117 int prom_getproperty(phandle node, const char *prop,
123 plen = prom_getproplen(node, prop);
130 args[3] = (unsigned int) node;
145 int prom_getint(phandle node, const char *prop)
149 if (prom_getproperty(node, prop, (char *) &intprop, sizeof(int)) != -1)
160 int prom_getintdefault(phandle node, const char *property, int deflt)
164 retval = prom_getint(node, property);
173 int prom_getbool(phandle node, const char *prop)
177 retval = prom_getproplen(node, prop);
188 void prom_getstring(phandle node, const char *prop, char *user_buf,
193 len = prom_getproperty(node, prop, user_buf, ubuf_size);
200 /* Does the device at node 'node' have name 'name'?
203 int prom_nodematch(phandle node, const char *name)
206 prom_getproperty(node, "name", namebuf, sizeof(namebuf));
212 /* Search siblings at 'node_start' for a node with name
213 * 'nodename'. Return node if successful, zero if not.
236 /* Return the first property type for node 'node'.
239 char *prom_firstprop(phandle node, char *buffer)
244 if ((s32)node == -1)
250 args[3] = (unsigned int) node;
262 * at node 'node' . Returns NULL string if no more
263 * property types for this node.
265 char *prom_nextprop(phandle node, const char *oprop, char *buffer)
270 if ((s32)node == -1) {
282 args[3] = (unsigned int) node;
311 int prom_node_has_property(phandle node, const char *prop)
317 prom_nextprop(node, buf, buf);
325 /* Set property 'pname' at node 'node' to value 'value' which has a length
329 prom_setprop(phandle node, const char *pname, char *value, int size)
347 args[3] = (unsigned int) node;
362 phandle node;
372 node = (int) args[4];
373 if ((s32)node == -1)
375 return node;