Lines Matching +full:int +full:- +full:property

1 // SPDX-License-Identifier: GPL-2.0
30 cnode = prom_nodeops->no_child(node); in __prom_getchild()
44 if ((s32)node == -1) in prom_getchild()
48 if (cnode == 0 || (s32)cnode == -1) in prom_getchild()
62 cnode = prom_nodeops->no_nextnode(node); in __prom_getsibling()
76 if ((s32)node == -1) in prom_getsibling()
80 if (sibnode == 0 || (s32)sibnode == -1) in prom_getsibling()
87 /* Return the length in bytes of property 'prop' at node 'node'.
88 * Return -1 on error.
90 int prom_getproplen(phandle node, const char *prop) in prom_getproplen()
92 int ret; in prom_getproplen()
96 return -1; in prom_getproplen()
99 ret = prom_nodeops->no_proplen(node, prop); in prom_getproplen()
106 /* Acquire a property 'prop' at node 'node' and place it in
108 * was successful the length will be returned, else -1 is returned.
110 int prom_getproperty(phandle node, const char *prop, char *buffer, int bufsize) in prom_getproperty()
112 int plen, ret; in prom_getproperty()
116 if((plen > bufsize) || (plen == 0) || (plen == -1)) in prom_getproperty()
117 return -1; in prom_getproperty()
120 ret = prom_nodeops->no_getprop(node, prop, buffer); in prom_getproperty()
127 /* Acquire an integer property and return its value. Returns -1
130 int prom_getint(phandle node, char *prop) in prom_getint()
132 static int intprop; in prom_getint()
134 if(prom_getproperty(node, prop, (char *) &intprop, sizeof(int)) != -1) in prom_getint()
137 return -1; in prom_getint()
141 /* Acquire an integer property, upon error return the passed default
144 int prom_getintdefault(phandle node, char *property, int deflt) in prom_getintdefault() argument
146 int retval; in prom_getintdefault()
148 retval = prom_getint(node, property); in prom_getintdefault()
149 if(retval == -1) return deflt; in prom_getintdefault()
155 /* Acquire a boolean property, 1=TRUE 0=FALSE. */
156 int prom_getbool(phandle node, char *prop) in prom_getbool()
158 int retval; in prom_getbool()
161 if(retval == -1) return 0; in prom_getbool()
166 /* Acquire a property whose value is a string, returns a null
170 void prom_getstring(phandle node, char *prop, char *user_buf, int ubuf_size) in prom_getstring()
172 int len; in prom_getstring()
175 if(len != -1) return; in prom_getstring()
188 int error; in prom_searchsiblings()
195 if(error == -1) continue; in prom_searchsiblings()
210 prop = prom_nodeops->no_nextprop(node, oprop); in __prom_nextprop()
217 /* Return the property type string after property type 'oprop'
219 * property types for this node.
223 if (node == 0 || (s32)node == -1) in prom_nextprop()
235 unsigned int which_io, phys_addr; in prom_finddevice()
257 while (node2 && (s32)node2 != -1) { in prom_finddevice()
265 if (!node2 || (s32)node2 == -1) in prom_finddevice()
278 /* Set property 'pname' at node 'node' to value 'value' which has a length
281 int prom_setprop(phandle node, const char *pname, char *value, int size) in prom_setprop()
284 int ret; in prom_setprop()
291 ret = prom_nodeops->no_setprop(node, pname, value, size); in prom_setprop()
298 phandle prom_inst2pkg(int inst) in prom_inst2pkg()
304 node = (*romvec->pv_v2devops.v2_inst2pkg)(inst); in prom_inst2pkg()
307 if ((s32)node == -1) in prom_inst2pkg()