"Das U-Boot" Source Tree

doc: add include/dm/of*.h to the HTML documentation

Correct Sphinx style comments in include/dm/ofnode.h
and add the device tree node API to the HTML documentation;
the ofnode functions are compatible with Live tree or with flat
device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

authored by

Patrick Delaunay and committed by
Heinrich Schuchardt
be74f71a 6de6a615

+297 -275
+9
doc/api/dm.rst
··· 17 17 .. kernel-doc:: include/dm/device.h 18 18 .. kernel-doc:: include/dm/devres.h 19 19 .. kernel-doc:: include/dm/read.h 20 + 21 + Device tree 22 + ----------- 23 + 24 + .. kernel-doc:: include/dm/of.h 25 + .. kernel-doc:: include/dm/ofnode.h 26 + .. kernel-doc:: include/dm/of_extra.h 27 + .. kernel-doc:: include/dm/of_access.h 28 + .. kernel-doc:: include/dm/of_addr.h
+6 -7
include/dm/of.h
··· 58 58 * struct of_phandle_args - structure to hold phandle and arguments 59 59 * 60 60 * This is used when decoding a phandle in a device tree property. Typically 61 - * these look like this: 61 + * these look like this:: 62 62 * 63 - * wibble { 64 - * phandle = <5>; 65 - * }; 66 - * 67 - * ... 68 - * some-prop = <&wibble 1 2 3> 63 + * wibble { 64 + * phandle = <5>; 65 + * }; 66 + * ... 67 + * some-prop = <&wibble 1 2 3> 69 68 * 70 69 * Here &node is the phandle of the node 'wibble', i.e. 5. There are three 71 70 * arguments: 1, 2, 3.
+74 -65
include/dm/of_access.h
··· 44 44 * which controls the given node. 45 45 * 46 46 * @np: Node pointer to check 47 - * @return number of address cells this node uses 47 + * Return: number of address cells this node uses 48 48 */ 49 49 int of_n_addr_cells(const struct device_node *np); 50 50 ··· 55 55 * which controls the given node. 56 56 * 57 57 * @np: Node pointer to check 58 - * @return number of size cells this node uses 58 + * Return: number of size cells this node uses 59 59 */ 60 60 int of_n_size_cells(const struct device_node *np); 61 61 ··· 65 65 * This function matches fdt_address_cells(). 66 66 * 67 67 * @np: Node pointer to check 68 - * @return value of #address-cells property in this node, or 2 if none 68 + * Return: value of #address-cells property in this node, or 2 if none 69 69 */ 70 70 int of_simple_addr_cells(const struct device_node *np); 71 71 ··· 75 75 * This function matches fdt_size_cells(). 76 76 * 77 77 * @np: Node pointer to check 78 - * @return value of #size-cells property in this node, or 2 if none 78 + * Return: value of #size-cells property in this node, or 2 if none 79 79 */ 80 80 int of_simple_size_cells(const struct device_node *np); 81 81 ··· 85 85 * @np: Pointer to device node holding property 86 86 * @name: Name of property 87 87 * @lenp: If non-NULL, returns length of property 88 - * @return pointer to property, or NULL if not found 88 + * Return: pointer to property, or NULL if not found 89 89 */ 90 90 struct property *of_find_property(const struct device_node *np, 91 91 const char *name, int *lenp); ··· 98 98 * @np: Pointer to device node holding property 99 99 * @name: Name of property 100 100 * @lenp: If non-NULL, returns length of property 101 - * @return pointer to property value, or NULL if not found 101 + * Return: pointer to property value, or NULL if not found 102 102 */ 103 103 const void *of_get_property(const struct device_node *np, const char *name, 104 104 int *lenp); ··· 110 110 * and read all the property with of_get_next_property_by_prop(). 111 111 * 112 112 * @np: Pointer to device node 113 - * @return pointer to property or NULL if not found 113 + * Return: pointer to property or NULL if not found 114 114 */ 115 115 const struct property *of_get_first_property(const struct device_node *np); 116 116 ··· 122 122 * 123 123 * @np: Pointer to device node 124 124 * @property: pointer of the current property 125 - * @return pointer to next property or NULL if not found 125 + * Return: pointer to next property or NULL if not found 126 126 */ 127 127 const struct property *of_get_next_property(const struct device_node *np, 128 128 const struct property *property); ··· 132 132 * 133 133 * Get value for the property identified by node and property pointer. 134 134 * 135 - * @node: node to read 135 + * @np: Pointer to device node 136 136 * @property: pointer of the property to read 137 - * @propname: place to property name on success 137 + * @name: place to property name on success 138 138 * @lenp: place to put length on success 139 - * @return pointer to property value or NULL if error 139 + * Return: pointer to property value or NULL if error 140 140 */ 141 141 const void *of_get_property_by_prop(const struct device_node *np, 142 142 const struct property *property, ··· 145 145 146 146 /** 147 147 * of_device_is_compatible() - Check if the node matches given constraints 148 - * @device: pointer to node 148 + * @np: Pointer to device node 149 149 * @compat: required compatible string, NULL or "" for any match 150 150 * @type: required device_type value, NULL or "" for any match 151 151 * @name: required node name, NULL or "" for any match ··· 154 154 * properties of the given @device. A constraints can be skipped by 155 155 * passing NULL or an empty string as the constraint. 156 156 * 157 - * @return 0 for no match, and a positive integer on match. The return 157 + * Return: 0 for no match, and a positive integer on match. The return 158 158 * value is a relative score with larger values indicating better 159 159 * matches. The score is weighted for the most specific compatible value 160 160 * to get the highest score. Matching type is next, followed by matching ··· 179 179 /** 180 180 * of_device_is_available() - check if a device is available for use 181 181 * 182 - * @device: Node to check for availability 182 + * @np: Pointer to device node to check for availability 183 183 * 184 - * @return true if the status property is absent or set to "okay", false 184 + * Return: true if the status property is absent or set to "okay", false 185 185 * otherwise 186 186 */ 187 187 bool of_device_is_available(const struct device_node *np); ··· 189 189 /** 190 190 * of_get_parent() - Get a node's parent, if any 191 191 * 192 - * @node: Node to check 193 - * @eturns a node pointer, or NULL if none 192 + * @np: Pointer to device node to check 193 + * Return: a node pointer, or NULL if none 194 194 */ 195 195 struct device_node *of_get_parent(const struct device_node *np); 196 196 ··· 208 208 * foo Valid alias 209 209 * foo/bar Valid alias + relative path 210 210 * 211 - * @return a node pointer or NULL if not found 211 + * Return: a node pointer or NULL if not found 212 212 */ 213 213 struct device_node *of_find_node_opts_by_path(const char *path, 214 214 const char **opts); ··· 228 228 * @type: The type string to match "device_type" or NULL to ignore 229 229 * @compatible: The string to match to one of the tokens in the device 230 230 * "compatible" list. 231 - * @return node pointer or NULL if not found 231 + * Return: node pointer or NULL if not found 232 232 */ 233 233 struct device_node *of_find_compatible_node(struct device_node *from, 234 234 const char *type, const char *compatible); ··· 243 243 * @propname: property name to check 244 244 * @propval: property value to search for 245 245 * @proplen: length of the value in propval 246 - * @return node pointer or NULL if not found 246 + * Return: node pointer or NULL if not found 247 247 */ 248 248 struct device_node *of_find_node_by_prop_value(struct device_node *from, 249 249 const char *propname, ··· 254 254 * 255 255 * @handle: phandle of the node to find 256 256 * 257 - * @return node pointer, or NULL if not found 257 + * Return: node pointer, or NULL if not found 258 258 */ 259 259 struct device_node *of_find_node_by_phandle(phandle handle); 260 260 ··· 268 268 * @propname: name of the property to be searched. 269 269 * @outp: pointer to return value, modified only if return value is 0. 270 270 * 271 - * @return 0 on success, -EINVAL if the property does not exist, 271 + * Return: 0 on success, -EINVAL if the property does not exist, 272 272 * -ENODATA if property does not have a value, and -EOVERFLOW if the 273 273 * property data isn't large enough. 274 274 */ ··· 286 286 * @index: index of the u32 in the list of values 287 287 * @outp: pointer to return value, modified only if return value is 0. 288 288 * 289 - * @return 0 on success, -EINVAL if the property does not exist, 290 - * -ENODATA if property does not have a value, and -EOVERFLOW if the 291 - * property data isn't large enough. 289 + * Return: 290 + * 0 on success, -EINVAL if the property does not exist, 291 + * -ENODATA if property does not have a value, and -EOVERFLOW if the 292 + * property data isn't large enough. 292 293 */ 293 294 int of_read_u32_index(const struct device_node *np, const char *propname, 294 295 int index, u32 *outp); ··· 303 304 * @propname: name of the property to be searched. 304 305 * @outp: pointer to return value, modified only if return value is 0. 305 306 * 306 - * @return 0 on success, -EINVAL if the property does not exist, 307 - * -ENODATA if property does not have a value, and -EOVERFLOW if the 308 - * property data isn't large enough. 307 + * Return: 308 + * 0 on success, -EINVAL if the property does not exist, 309 + * -ENODATA if property does not have a value, and -EOVERFLOW if the 310 + * property data isn't large enough. 309 311 */ 310 312 int of_read_u64(const struct device_node *np, const char *propname, u64 *outp); 311 313 ··· 319 321 * @propname: name of the property to be searched. 320 322 * @out_values: pointer to return value, modified only if return value is 0. 321 323 * @sz: number of array elements to read 322 - * @return 0 on success, -EINVAL if the property does not exist, -ENODATA 323 - * if property does not have a value, and -EOVERFLOW is longer than sz. 324 + * Return: 325 + * 0 on success, -EINVAL if the property does not exist, -ENODATA 326 + * if property does not have a value, and -EOVERFLOW is longer than sz. 324 327 */ 325 328 int of_read_u32_array(const struct device_node *np, const char *propname, 326 329 u32 *out_values, size_t sz); ··· 334 337 * @np: pointer to node containing string list property 335 338 * @propname: string list property name 336 339 * @string: pointer to string to search for in string list 337 - * @return 0 on success, -EINVAL if the property does not exist, -ENODATA 338 - * if property does not have a value, and -EOVERFLOW is longer than sz. 340 + * Return: 341 + * 0 on success, -EINVAL if the property does not exist, -ENODATA 342 + * if property does not have a value, and -EOVERFLOW is longer than sz. 339 343 */ 340 344 int of_property_match_string(const struct device_node *np, const char *propname, 341 345 const char *string); ··· 350 354 * @np: device node from which the property value is to be read. 351 355 * @propname: name of the property to be searched. 352 356 * @index: index of the string in the list of strings 353 - * @out_string: pointer to null terminated return string, modified only if 357 + * @output: pointer to null terminated return string, modified only if 354 358 * return value is 0. 355 359 * 356 360 * Search for a property in a device tree node and retrieve a null 357 361 * terminated string value (pointer to data, not a copy) in the list of strings 358 362 * contained in that property. 359 - * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if 360 - * property does not have a value, and -EILSEQ if the string is not 361 - * null-terminated within the length of the property data. 363 + * 364 + * Return: 365 + * 0 on success, -EINVAL if the property does not exist, -ENODATA if 366 + * property does not have a value, and -EILSEQ if the string is not 367 + * null-terminated within the length of the property data. 362 368 * 363 369 * The out_string pointer is modified only if a valid string can be decoded. 364 370 */ ··· 377 383 * @propname: name of the property to be searched. 378 384 * 379 385 * Search for a property in a device tree node and retrieve the number of null 380 - * terminated string contain in it. Returns the number of strings on 381 - * success, -EINVAL if the property does not exist, -ENODATA if property 382 - * does not have a value, and -EILSEQ if the string is not null-terminated 383 - * within the length of the property data. 386 + * terminated string contain in it. 387 + * 388 + * Return: 389 + * the number of strings on success, -EINVAL if the property does not exist, 390 + * -ENODATA if property does not have a value, and -EILSEQ if the string is 391 + * not null-terminated within the length of the property data. 384 392 */ 385 393 static inline int of_property_count_strings(const struct device_node *np, 386 394 const char *propname) ··· 395 403 * @index: For properties holding a table of phandles, this is the index into 396 404 * the table 397 405 * 398 - * Returns the device_node pointer with refcount incremented. Use 399 - * of_node_put() on it when done. 406 + * Return: 407 + * the device_node pointer with refcount incremented. Use 408 + * of_node_put() on it when done. 400 409 */ 401 410 struct device_node *of_parse_phandle(const struct device_node *np, 402 411 const char *phandle_name, int index); ··· 410 419 * @cells_count: Cell count to use if @cells_name is NULL 411 420 * @index: index of a phandle to parse out 412 421 * @out_args: optional pointer to output arguments structure (will be filled) 413 - * @return 0 on success (with @out_args filled out if not NULL), -ENOENT if 414 - * @list_name does not exist, -EINVAL if a phandle was not found, 415 - * @cells_name could not be found, the arguments were truncated or there 416 - * were too many arguments. 422 + * Return: 423 + * 0 on success (with @out_args filled out if not NULL), -ENOENT if 424 + * @list_name does not exist, -EINVAL if a phandle was not found, 425 + * @cells_name could not be found, the arguments were truncated or there 426 + * were too many arguments. 417 427 * 418 428 * This function is useful to parse lists of phandles and their arguments. 419 429 * Returns 0 on success and fills out_args, on error returns appropriate ··· 424 434 * 425 435 * Example: 426 436 * 427 - * phandle1: node1 { 428 - * #list-cells = <2>; 429 - * } 437 + * .. code-block:: 430 438 * 431 - * phandle2: node2 { 432 - * #list-cells = <1>; 433 - * } 434 - * 435 - * node3 { 436 - * list = <&phandle1 1 2 &phandle2 3>; 437 - * } 439 + * phandle1: node1 { 440 + * #list-cells = <2>; 441 + * }; 442 + * phandle2: node2 { 443 + * #list-cells = <1>; 444 + * }; 445 + * node3 { 446 + * list = <&phandle1 1 2 &phandle2 3>; 447 + * }; 438 448 * 439 449 * To get a device_node of the `node2' node you may call this: 440 450 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); ··· 451 461 * @list_name: property name that contains a list 452 462 * @cells_name: property name that specifies phandles' arguments count 453 463 * @cells_count: Cell count to use if @cells_name is NULL 454 - * @return number of phandle found, -ENOENT if 455 - * @list_name does not exist, -EINVAL if a phandle was not found, 456 - * @cells_name could not be found, the arguments were truncated or there 457 - * were too many arguments. 464 + * Return: 465 + * number of phandle found, -ENOENT if @list_name does not exist, 466 + * -EINVAL if a phandle was not found, @cells_name could not be found, 467 + * the arguments were truncated or there were too many arguments. 458 468 * 459 469 * Returns number of phandle found on success, on error returns appropriate 460 470 * errno value. 461 - * 462 471 */ 463 472 int of_count_phandle_with_args(const struct device_node *np, 464 473 const char *list_name, const char *cells_name, ··· 471 480 * the lookup table with the properties. It returns the number of alias 472 481 * properties found, or an error code in case of failure. 473 482 * 474 - * @return 9 if OK, -ENOMEM if not enough memory 483 + * Return: 9 if OK, -ENOMEM if not enough memory 475 484 */ 476 485 int of_alias_scan(void); 477 486 ··· 483 492 * 484 493 * @np: Pointer to the given device_node 485 494 * @stem: Alias stem of the given device_node 486 - * @return alias ID, if found, else -ENODEV 495 + * Return: alias ID, if found, else -ENODEV 487 496 */ 488 497 int of_alias_get_id(const struct device_node *np, const char *stem); 489 498 ··· 493 502 * 494 503 * The function travels the lookup table to get the highest alias id for the 495 504 * given alias stem. 496 - * @return alias ID, if found, else -1 505 + * Return: alias ID, if found, else -1 497 506 */ 498 507 int of_alias_get_highest_id(const char *stem); 499 508 500 509 /** 501 510 * of_get_stdout() - Get node to use for stdout 502 511 * 503 - * @return node referred to by stdout-path alias, or NULL if none 512 + * Return: node referred to by stdout-path alias, or NULL if none 504 513 */ 505 514 struct device_node *of_get_stdout(void); 506 515
+16 -17
include/dm/of_addr.h
··· 20 20 * that can be mapped to a cpu physical address). This is not really specified 21 21 * that way, but this is traditionally the way IBM at least do things 22 22 * 23 - * @np: node to check 23 + * @np: pointer to node to check 24 24 * @in_addr: pointer to input address 25 - * @return translated address or OF_BAD_ADDR on error 25 + * Return: translated address or OF_BAD_ADDR on error 26 26 */ 27 - u64 of_translate_address(const struct device_node *no, const __be32 *in_addr); 27 + u64 of_translate_address(const struct device_node *np, const __be32 *in_addr); 28 28 29 29 /** 30 30 * of_translate_dma_address() - translate a device-tree DMA address to a CPU ··· 38 38 * that can be mapped to a cpu physical address). This is not really specified 39 39 * that way, but this is traditionally the way IBM at least do things 40 40 * 41 - * @np: node to check 41 + * @np: ne 42 42 * @in_addr: pointer to input DMA address 43 - * @return translated DMA address or OF_BAD_ADDR on error 43 + * Return: translated DMA address or OF_BAD_ADDR on error 44 44 */ 45 - u64 of_translate_dma_address(const struct device_node *no, const __be32 *in_addr); 45 + u64 of_translate_dma_address(const struct device_node *np, const __be32 *in_addr); 46 46 47 47 48 48 /** ··· 51 51 * Get DMA ranges for a specifc node, this is useful to perform bus->cpu and 52 52 * cpu->bus address translations 53 53 * 54 - * @param blob Pointer to device tree blob 55 - * @param node_offset Node DT offset 56 - * @param cpu Pointer to variable storing the range's cpu address 57 - * @param bus Pointer to variable storing the range's bus address 58 - * @param size Pointer to variable storing the range's size 59 - * @return translated DMA address or OF_BAD_ADDR on error 54 + * @np: Pointer to device tree blob 55 + * @cpu: Pointer to variable storing the range's cpu address 56 + * @bus: Pointer to variable storing the range's bus address 57 + * @size: Pointer to variable storing the range's size 58 + * Return: translated DMA address or OF_BAD_ADDR on error 60 59 */ 61 - int of_get_dma_range(const struct device_node *dev, phys_addr_t *cpu, 60 + int of_get_dma_range(const struct device_node *np, phys_addr_t *cpu, 62 61 dma_addr_t *bus, u64 *size); 63 62 64 63 /** ··· 72 71 * @index: Index of address to read (0 = first) 73 72 * @size: place to put size on success 74 73 * @flags: place to put flags on success 75 - * @return pointer to address which can be read 74 + * Return: pointer to address which can be read 76 75 */ 77 - const __be32 *of_get_address(const struct device_node *no, int index, 76 + const __be32 *of_get_address(const struct device_node *np, int index, 78 77 u64 *size, unsigned int *flags); 79 78 80 79 struct resource; ··· 90 89 * @np: node to check 91 90 * @index: index of address to read (0 = first) 92 91 * @r: place to put resource information 93 - * @return 0 if OK, -ve on error 92 + * Return: 0 if OK, -ve on error 94 93 */ 95 - int of_address_to_resource(const struct device_node *no, int index, 94 + int of_address_to_resource(const struct device_node *np, int index, 96 95 struct resource *r); 97 96 98 97 #endif
+24 -24
include/dm/of_extra.h
··· 41 41 }; 42 42 43 43 /** 44 - * Read a flash entry from the fdt 44 + * ofnode_read_fmap_entry() - Read a flash entry from the fdt 45 45 * 46 - * @param node Reference to node to read 47 - * @param entry Place to put offset and size of this node 48 - * @return 0 if ok, -ve on error 46 + * @node: Reference to node to read 47 + * @entry: Place to put offset and size of this node 48 + * Return: 0 if ok, -ve on error 49 49 */ 50 50 int ofnode_read_fmap_entry(ofnode node, struct fmap_entry *entry); 51 51 ··· 58 58 * The property must hold one address with a length. This is only tested on 59 59 * 32-bit machines. 60 60 * 61 - * @param node ofnode to examine 62 - * @param prop_name name of property to find 63 - * @param basep Returns base address of region 64 - * @param size Returns size of region 65 - * @return 0 if ok, -1 on error (property not found) 61 + * @node: ofnode to examine 62 + * @prop_name: name of property to find 63 + * @basep: Returns base address of region 64 + * @sizep: Returns size of region 65 + * Return: 0 if ok, -1 on error (property not found) 66 66 */ 67 67 int ofnode_decode_region(ofnode node, const char *prop_name, fdt_addr_t *basep, 68 68 fdt_size_t *sizep); ··· 81 81 * The property value must have an offset and a size. The function checks 82 82 * that the region is entirely within the memory bank.5 83 83 * 84 - * @param node ofnode containing the properties (-1 for /config) 85 - * @param mem_type Type of memory to use, which is a name, such as 86 - * "u-boot" or "kernel". 87 - * @param suffix String to append to the memory/offset 88 - * property names 89 - * @param basep Returns base of region 90 - * @param sizep Returns size of region 91 - * @return 0 if OK, -ive on error 84 + * @config_node: ofnode containing the properties (invalid for "/config") 85 + * @mem_type: Type of memory to use, which is a name, such as 86 + * "u-boot" or "kernel". 87 + * @suffix: String to append to the memory/offset 88 + * property names 89 + * @basep: Returns base of region 90 + * @sizep: Returns size of region 91 + * Return: 0 if OK, -ive on error 92 92 */ 93 93 int ofnode_decode_memory_region(ofnode config_node, const char *mem_type, 94 94 const char *suffix, fdt_addr_t *basep, ··· 102 102 * 103 103 * This function supports the following two DT bindings: 104 104 * - the new DT binding, where 'fixed-link' is a sub-node of the 105 - * Ethernet device 105 + * Ethernet device 106 106 * - the old DT binding, where 'fixed-link' is a property with 5 107 - * cells encoding various information about the fixed PHY 107 + * cells encoding various information about the fixed PHY 108 108 * 109 109 * If both new and old bindings exist, the new one is preferred. 110 110 * 111 - * @param eth_node ofnode containing the fixed-link subnode/property 112 - * @param phy_node if fixed-link PHY detected, containing the PHY ofnode 113 - * @return true if a fixed-link pseudo-PHY device exists, false otherwise 111 + * @eth_node: ofnode containing the fixed-link subnode/property 112 + * @phy_node: if fixed-link PHY detected, containing the PHY ofnode 113 + * Return: true if a fixed-link pseudo-PHY device exists, false otherwise 114 114 */ 115 115 bool ofnode_phy_is_fixed_link(ofnode eth_node, ofnode *phy_node); 116 116 ··· 123 123 * is connected to an on-board PHY or an SFP cage, and is not relevant when it 124 124 * has a fixed link (in that case, in-band autoneg should not be used). 125 125 * 126 - * @param eth_node ofnode belonging to the Ethernet controller 127 - * @return true if in-band autoneg should be used, false otherwise 126 + * @eth_node: ofnode belonging to the Ethernet controller 127 + * Return: true if in-band autoneg should be used, false otherwise 128 128 */ 129 129 bool ofnode_eth_uses_inband_aneg(ofnode eth_node); 130 130
+168 -162
include/dm/ofnode.h
··· 19 19 struct resource; 20 20 21 21 /** 22 - * ofnode - reference to a device tree node 22 + * typedef union ofnode_union ofnode - reference to a device tree node 23 23 * 24 24 * This union can hold either a straightforward pointer to a struct device_node 25 25 * in the live device tree, or an offset within the flat device tree. In the ··· 27 27 * 28 28 * Thus we can reference nodes in both the live tree (once available) and the 29 29 * flat tree (until then). Functions are available to translate between an 30 - * ofnode and either an offset or a struct device_node *. 30 + * ofnode and either an offset or a `struct device_node *`. 31 31 * 32 32 * The reference can also hold a null offset, in which case the pointer value 33 33 * here is NULL. This corresponds to a struct device_node * value of ··· 61 61 }; 62 62 63 63 /** 64 - * ofprop - reference to a property of a device tree node 64 + * struct ofprop - reference to a property of a device tree node 65 65 * 66 66 * This struct hold the reference on one property of one node, 67 67 * using struct ofnode and an offset within the flat device tree or either ··· 91 91 * This cannot be called if the reference contains an offset. 92 92 * 93 93 * @node: Reference containing struct device_node * (possibly invalid) 94 - * @return pointer to device node (can be NULL) 94 + * Return: pointer to device node (can be NULL) 95 95 */ 96 96 static inline const struct device_node *ofnode_to_np(ofnode node) 97 97 { ··· 108 108 * This cannot be called if the reference contains a node pointer. 109 109 * 110 110 * @node: Reference containing offset (possibly invalid) 111 - * @return DT offset (can be -1) 111 + * Return: DT offset (can be -1) 112 112 */ 113 113 static inline int ofnode_to_offset(ofnode node) 114 114 { ··· 122 122 /** 123 123 * ofnode_valid() - check if an ofnode is valid 124 124 * 125 - * @return true if the reference contains a valid ofnode, false if it is NULL 125 + * @node: Reference containing offset (possibly invalid) 126 + * Return: true if the reference contains a valid ofnode, false if it is NULL 126 127 */ 127 128 static inline bool ofnode_valid(ofnode node) 128 129 { ··· 136 137 * offset_to_ofnode() - convert a DT offset to an ofnode 137 138 * 138 139 * @of_offset: DT offset (either valid, or -1) 139 - * @return reference to the associated DT offset 140 + * Return: reference to the associated DT offset 140 141 */ 141 142 static inline ofnode offset_to_ofnode(int of_offset) 142 143 { ··· 154 155 * np_to_ofnode() - convert a node pointer to an ofnode 155 156 * 156 157 * @np: Live node pointer (can be NULL) 157 - * @return reference to the associated node pointer 158 + * Return: reference to the associated node pointer 158 159 */ 159 160 static inline ofnode np_to_ofnode(const struct device_node *np) 160 161 { ··· 173 174 * is valid is not permitted. 174 175 * 175 176 * @node: reference to check (possibly invalid) 176 - * @return true if the reference is a live node pointer, false if it is a DT 177 + * Return: true if the reference is a live node pointer, false if it is a DT 177 178 * offset 178 179 */ 179 180 static inline bool ofnode_is_np(ofnode node) ··· 193 194 /** 194 195 * ofnode_equal() - check if two references are equal 195 196 * 196 - * @return true if equal, else false 197 + * @ref1: first reference to check (possibly invalid) 198 + * @ref2: second reference to check (possibly invalid) 199 + * Return: true if equal, else false 197 200 */ 198 201 static inline bool ofnode_equal(ofnode ref1, ofnode ref2) 199 202 { ··· 237 240 * 238 241 * @node: valid node reference that has to be compared 239 242 * @name: name that has to be compared with the node name 240 - * @return true if matches, false if it doesn't match 243 + * Return: true if matches, false if it doesn't match 241 244 */ 242 245 bool ofnode_name_eq(ofnode node, const char *name); 243 246 244 247 /** 245 248 * ofnode_read_u32() - Read a 32-bit integer from a property 246 249 * 247 - * @ref: valid node reference to read property from 250 + * @node: valid node reference to read property from 248 251 * @propname: name of the property to read from 249 252 * @outp: place to put value (if found) 250 - * @return 0 if OK, -ve on error 253 + * Return: 0 if OK, -ve on error 251 254 */ 252 255 int ofnode_read_u32(ofnode node, const char *propname, u32 *outp); 253 256 254 257 /** 255 258 * ofnode_read_u32_index() - Read a 32-bit integer from a multi-value property 256 259 * 257 - * @ref: valid node reference to read property from 260 + * @node: valid node reference to read property from 258 261 * @propname: name of the property to read from 259 262 * @index: index of the integer to return 260 263 * @outp: place to put value (if found) 261 - * @return 0 if OK, -ve on error 264 + * Return: 0 if OK, -ve on error 262 265 */ 263 266 int ofnode_read_u32_index(ofnode node, const char *propname, int index, 264 267 u32 *outp); ··· 266 269 /** 267 270 * ofnode_read_s32() - Read a 32-bit integer from a property 268 271 * 269 - * @ref: valid node reference to read property from 272 + * @node: valid node reference to read property from 270 273 * @propname: name of the property to read from 271 274 * @outp: place to put value (if found) 272 - * @return 0 if OK, -ve on error 275 + * Return: 0 if OK, -ve on error 273 276 */ 274 277 static inline int ofnode_read_s32(ofnode node, const char *propname, 275 - s32 *out_value) 278 + s32 *outp) 276 279 { 277 - return ofnode_read_u32(node, propname, (u32 *)out_value); 280 + return ofnode_read_u32(node, propname, (u32 *)outp); 278 281 } 279 282 280 283 /** 281 284 * ofnode_read_u32_default() - Read a 32-bit integer from a property 282 285 * 283 - * @ref: valid node reference to read property from 286 + * @node: valid node reference to read property from 284 287 * @propname: name of the property to read from 285 288 * @def: default value to return if the property has no value 286 - * @return property value, or @def if not found 289 + * Return: property value, or @def if not found 287 290 */ 288 - u32 ofnode_read_u32_default(ofnode ref, const char *propname, u32 def); 291 + u32 ofnode_read_u32_default(ofnode node, const char *propname, u32 def); 289 292 290 293 /** 291 294 * ofnode_read_u32_index_default() - Read a 32-bit integer from a multi-value 292 295 * property 293 296 * 294 - * @ref: valid node reference to read property from 297 + * @node: valid node reference to read property from 295 298 * @propname: name of the property to read from 296 299 * @index: index of the integer to return 297 300 * @def: default value to return if the property has no value 298 - * @return property value, or @def if not found 301 + * Return: property value, or @def if not found 299 302 */ 300 - u32 ofnode_read_u32_index_default(ofnode ref, const char *propname, int index, 303 + u32 ofnode_read_u32_index_default(ofnode node, const char *propname, int index, 301 304 u32 def); 302 305 303 306 /** 304 307 * ofnode_read_s32_default() - Read a 32-bit integer from a property 305 308 * 306 - * @ref: valid node reference to read property from 309 + * @node: valid node reference to read property from 307 310 * @propname: name of the property to read from 308 311 * @def: default value to return if the property has no value 309 - * @return property value, or @def if not found 312 + * Return: property value, or @def if not found 310 313 */ 311 314 int ofnode_read_s32_default(ofnode node, const char *propname, s32 def); 312 315 ··· 316 319 * @node: valid node reference to read property from 317 320 * @propname: name of the property to read from 318 321 * @outp: place to put value (if found) 319 - * @return 0 if OK, -ve on error 322 + * Return: 0 if OK, -ve on error 320 323 */ 321 324 int ofnode_read_u64(ofnode node, const char *propname, u64 *outp); 322 325 323 326 /** 324 327 * ofnode_read_u64_default() - Read a 64-bit integer from a property 325 328 * 326 - * @ref: valid node reference to read property from 329 + * @node: valid node reference to read property from 327 330 * @propname: name of the property to read from 328 331 * @def: default value to return if the property has no value 329 - * @return property value, or @def if not found 332 + * Return: property value, or @def if not found 330 333 */ 331 334 u64 ofnode_read_u64_default(ofnode node, const char *propname, u64 def); 332 335 ··· 336 339 * @node: valid node reference to read property from 337 340 * @propname: name of the property to read 338 341 * @sizep: if non-NULL, returns the size of the property, or an error code 339 - if not found 340 - * @return property value, or NULL if there is no such property 342 + * if not found 343 + * Return: property value, or NULL if there is no such property 341 344 */ 342 345 const void *ofnode_read_prop(ofnode node, const char *propname, int *sizep); 343 346 ··· 346 349 * 347 350 * @node: valid node reference to read property from 348 351 * @propname: name of the property to read 349 - * @return string from property value, or NULL if there is no such property 352 + * Return: string from property value, or NULL if there is no such property 350 353 */ 351 354 const char *ofnode_read_string(ofnode node, const char *propname); 352 355 ··· 357 360 * @propname: name of the property to read 358 361 * @out_values: pointer to return value, modified only if return value is 0 359 362 * @sz: number of array elements to read 360 - * @return 0 if OK, -ve on error 363 + * Return: 0 if OK, -ve on error 361 364 * 362 365 * Search for a property in a device node and read 32-bit value(s) from 363 366 * it. Returns 0 on success, -EINVAL if the property does not exist, ··· 374 377 * 375 378 * @node: valid node reference to read property from 376 379 * @propname: name of property to read 377 - * @return true if property is present (meaning true), false if not present 380 + * Return: true if property is present (meaning true), false if not present 378 381 */ 379 382 bool ofnode_read_bool(ofnode node, const char *propname); 380 383 ··· 383 386 * 384 387 * @node: valid reference to parent node 385 388 * @subnode_name: name of subnode to find 386 - * @return reference to subnode (which can be invalid if there is no such 389 + * Return: reference to subnode (which can be invalid if there is no such 387 390 * subnode) 388 391 */ 389 392 ofnode ofnode_find_subnode(ofnode node, const char *subnode_name); ··· 429 432 * by default. 430 433 * 431 434 * @node: node to examine 432 - * @return false (not enabled) or true (enabled) 435 + * Return: false (not enabled) or true (enabled) 433 436 */ 434 437 bool ofnode_is_enabled(ofnode node); 435 438 ··· 437 440 * ofnode_first_subnode() - find the first subnode of a parent node 438 441 * 439 442 * @node: valid reference to a valid parent node 440 - * @return reference to the first subnode (which can be invalid if the parent 443 + * Return: reference to the first subnode (which can be invalid if the parent 441 444 * node has no subnodes) 442 445 */ 443 446 ofnode ofnode_first_subnode(ofnode node); ··· 446 449 * ofnode_next_subnode() - find the next sibling of a subnode 447 450 * 448 451 * @node: valid reference to previous node (sibling) 449 - * @return reference to the next subnode (which can be invalid if the node 452 + * Return: reference to the next subnode (which can be invalid if the node 450 453 * has no more siblings) 451 454 */ 452 455 ofnode ofnode_next_subnode(ofnode node); ··· 456 459 * ofnode_get_parent() - get the ofnode's parent (enclosing ofnode) 457 460 * 458 461 * @node: valid node to look up 459 - * @return ofnode reference of the parent node 462 + * Return: ofnode reference of the parent node 460 463 */ 461 464 ofnode ofnode_get_parent(ofnode node); 462 465 ··· 464 467 * ofnode_get_name() - get the name of a node 465 468 * 466 469 * @node: valid node to look up 467 - * @return name of node 470 + * Return: name of node 468 471 */ 469 472 const char *ofnode_get_name(ofnode node); 470 473 ··· 474 477 * @node: valid node to look up 475 478 * @buf: buffer to write the node path into 476 479 * @buflen: buffer size 477 - * @return 0 if OK, -ve on error 480 + * Return: 0 if OK, -ve on error 478 481 */ 479 482 int ofnode_get_path(ofnode node, char *buf, int buflen); 480 483 ··· 482 485 * ofnode_get_by_phandle() - get ofnode from phandle 483 486 * 484 487 * @phandle: phandle to look up 485 - * @return ofnode reference to the phandle 488 + * Return: ofnode reference to the phandle 486 489 */ 487 490 ofnode ofnode_get_by_phandle(uint phandle); 488 491 ··· 491 494 * 492 495 * @node: node to check 493 496 * @propname: property to check 494 - * @return size of property if present, or -EINVAL if not 497 + * Return: size of property if present, or -EINVAL if not 495 498 */ 496 499 int ofnode_read_size(ofnode node, const char *propname); 497 500 ··· 504 507 * @node: node to read from 505 508 * @index: Index of address to read (0 for first) 506 509 * @size: Pointer to size of the address 507 - * @return address, or FDT_ADDR_T_NONE if not present or invalid 510 + * Return: address, or FDT_ADDR_T_NONE if not present or invalid 508 511 */ 509 512 phys_addr_t ofnode_get_addr_size_index(ofnode node, int index, 510 513 fdt_size_t *size); ··· 521 524 * @node: node to read from 522 525 * @index: Index of address to read (0 for first) 523 526 * @size: Pointer to size of the address 524 - * @return address, or FDT_ADDR_T_NONE if not present or invalid 527 + * Return: address, or FDT_ADDR_T_NONE if not present or invalid 525 528 */ 526 529 phys_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index, 527 530 fdt_size_t *size); ··· 533 536 * 534 537 * @node: node to read from 535 538 * @index: Index of address to read (0 for first) 536 - * @return address, or FDT_ADDR_T_NONE if not present or invalid 539 + * Return: address, or FDT_ADDR_T_NONE if not present or invalid 537 540 */ 538 541 phys_addr_t ofnode_get_addr_index(ofnode node, int index); 539 542 ··· 543 546 * This reads the register address from a node 544 547 * 545 548 * @node: node to read from 546 - * @return address, or FDT_ADDR_T_NONE if not present or invalid 549 + * Return: address, or FDT_ADDR_T_NONE if not present or invalid 547 550 */ 548 551 phys_addr_t ofnode_get_addr(ofnode node); 549 552 ··· 553 556 * This reads the register size from a node 554 557 * 555 558 * @node: node to read from 556 - * @return size of the address, or FDT_SIZE_T_NONE if not present or invalid 559 + * Return: size of the address, or FDT_SIZE_T_NONE if not present or invalid 557 560 */ 558 561 fdt_size_t ofnode_get_size(ofnode node); 559 562 ··· 570 573 * @propname: name of the property containing the string list 571 574 * @string: string to look up in the string list 572 575 * 573 - * @return: 576 + * Return: 574 577 * the index of the string in the list of strings 575 578 * -ENODATA if the property is not found 576 579 * -EINVAL on some other error ··· 591 594 * @node: node to check 592 595 * @propname: name of the property containing the string list 593 596 * @index: index of the string to return (cannot be negative) 594 - * @lenp: return location for the string length or an error code on failure 597 + * @outp: return location for the string 595 598 * 596 - * @return: 599 + * Return: 597 600 * 0 if found or -ve error value if not found 598 601 */ 599 602 int ofnode_read_string_index(ofnode node, const char *propname, int index, ··· 603 606 * ofnode_read_string_count() - find the number of strings in a string list 604 607 * 605 608 * @node: node to check 606 - * @propname: name of the property containing the string list 607 - * @return: 609 + * @property: name of the property containing the string list 610 + * Return: 608 611 * number of strings in the list, or -ve error value if not found 609 612 */ 610 613 int ofnode_read_string_count(ofnode node, const char *property); ··· 620 623 * changed as they point directly into the devicetree property. 621 624 * 622 625 * @node: node to check 626 + * @property: name of the property containing the string list 623 627 * @listp: returns an allocated, NULL-terminated list of strings if the return 624 628 * value is > 0, else is set to NULL 625 - * @return number of strings in list, 0 if none, -ENOMEM if out of memory, 626 - * -EINVAL if no such property, -EENODATA if property is empty 627 - * @return: NULL-terminated list of strings (NULL if no property or empty) 629 + * Return: 630 + * number of strings in list, 0 if none, -ENOMEM if out of memory, 631 + * -EINVAL if no such property, -EENODATA if property is empty 628 632 */ 629 633 int ofnode_read_string_list(ofnode node, const char *property, 630 634 const char ***listp); ··· 641 645 * 642 646 * Example: 643 647 * 644 - * phandle1: node1 { 645 - * #list-cells = <2>; 646 - * } 647 - * 648 - * phandle2: node2 { 649 - * #list-cells = <1>; 650 - * } 648 + * .. code-block:: 651 649 * 652 - * node3 { 653 - * list = <&phandle1 1 2 &phandle2 3>; 654 - * } 650 + * phandle1: node1 { 651 + * #list-cells = <2>; 652 + * }; 653 + * phandle2: node2 { 654 + * #list-cells = <1>; 655 + * }; 656 + * node3 { 657 + * list = <&phandle1 1 2 &phandle2 3>; 658 + * }; 655 659 * 656 660 * To get a device_node of the `node2' node you may call this: 657 661 * ofnode_parse_phandle_with_args(node3, "list", "#list-cells", 0, 1, &args); ··· 659 663 * @node: device tree node containing a list 660 664 * @list_name: property name that contains a list 661 665 * @cells_name: property name that specifies phandles' arguments count 662 - * @cells_count: Cell count to use if @cells_name is NULL 666 + * @cell_count: Cell count to use if @cells_name is NULL 663 667 * @index: index of a phandle to parse out 664 668 * @out_args: optional pointer to output arguments structure (will be filled) 665 - * @return 0 on success (with @out_args filled out if not NULL), -ENOENT if 666 - * @list_name does not exist, -EINVAL if a phandle was not found, 667 - * @cells_name could not be found, the arguments were truncated or there 668 - * were too many arguments. 669 + * Return: 670 + * 0 on success (with @out_args filled out if not NULL), -ENOENT if 671 + * @list_name does not exist, -EINVAL if a phandle was not found, 672 + * @cells_name could not be found, the arguments were truncated or there 673 + * were too many arguments. 669 674 */ 670 675 int ofnode_parse_phandle_with_args(ofnode node, const char *list_name, 671 676 const char *cells_name, int cell_count, ··· 682 687 * @node: device tree node containing a list 683 688 * @list_name: property name that contains a list 684 689 * @cells_name: property name that specifies phandles' arguments count 685 - * @cells_count: Cell count to use if @cells_name is NULL 686 - * @return number of phandle on success, -ENOENT if @list_name does not 687 - * exist, -EINVAL if a phandle was not found, @cells_name could not 688 - * be found. 690 + * @cell_count: Cell count to use if @cells_name is NULL 691 + * Return: 692 + * number of phandle on success, -ENOENT if @list_name does not exist, 693 + * -EINVAL if a phandle was not found, @cells_name could not be found. 689 694 */ 690 695 int ofnode_count_phandle_with_args(ofnode node, const char *list_name, 691 696 const char *cells_name, int cell_count); ··· 694 699 * ofnode_path() - find a node by full path 695 700 * 696 701 * @path: Full path to node, e.g. "/bus/spi@1" 697 - * @return reference to the node found. Use ofnode_valid() to check if it exists 702 + * Return: reference to the node found. Use ofnode_valid() to check if it exists 698 703 */ 699 704 ofnode ofnode_path(const char *path); 700 705 ··· 704 709 * This looks for a property within the /chosen node and returns its value 705 710 * 706 711 * @propname: Property name to look for 707 - * @sizep: Returns size of property, or FDT_ERR_... error code if function 712 + * @sizep: Returns size of property, or `FDT_ERR_...` error code if function 708 713 * returns NULL 709 - * @return property value if found, else NULL 714 + * Return: property value if found, else NULL 710 715 */ 711 716 const void *ofnode_read_chosen_prop(const char *propname, int *sizep); 712 717 ··· 717 722 * checking that it is a valid nul-terminated string 718 723 * 719 724 * @propname: Property name to look for 720 - * @return string value if found, else NULL 725 + * Return: string value if found, else NULL 721 726 */ 722 727 const char *ofnode_read_chosen_string(const char *propname); 723 728 ··· 727 732 * This looks up a named property in the chosen node and uses that as a path to 728 733 * look up a code. 729 734 * 730 - * @return the referenced node if present, else ofnode_null() 735 + * @propname: Property name to look for 736 + * Return: the referenced node if present, else ofnode_null() 731 737 */ 732 738 ofnode ofnode_get_chosen_node(const char *propname); 733 739 ··· 737 743 * This looks for a property within the /aliases node and returns its value 738 744 * 739 745 * @propname: Property name to look for 740 - * @sizep: Returns size of property, or FDT_ERR_... error code if function 746 + * @sizep: Returns size of property, or `FDT_ERR_...` error code if function 741 747 * returns NULL 742 - * @return property value if found, else NULL 748 + * Return: property value if found, else NULL 743 749 */ 744 750 const void *ofnode_read_aliases_prop(const char *propname, int *sizep); 745 751 ··· 749 755 * This looks up a named property in the aliases node and uses that as a path to 750 756 * look up a code. 751 757 * 752 - * @return the referenced node if present, else ofnode_null() 758 + * @propname: Property name to look for 759 + * Return: the referenced node if present, else ofnode_null() 753 760 */ 754 761 ofnode ofnode_get_aliases_node(const char *propname); 755 762 ··· 761 768 * See doc/device-tree-bindings/video/display-timing.txt for binding 762 769 * information. 763 770 * 764 - * @node 'display-timing' node containing the timing subnodes 765 - * @index Index number to read (0=first timing subnode) 766 - * @config Place to put timings 767 - * @return 0 if OK, -FDT_ERR_NOTFOUND if not found 771 + * @node: 'display-timing' node containing the timing subnodes 772 + * @index: Index number to read (0=first timing subnode) 773 + * @config: Place to put timings 774 + * Return: 0 if OK, -FDT_ERR_NOTFOUND if not found 768 775 */ 769 776 int ofnode_decode_display_timing(ofnode node, int index, 770 777 struct display_timing *config); ··· 775 782 * @node: node to read 776 783 * @propname: property to read 777 784 * @lenp: place to put length on success 778 - * @return pointer to property, or NULL if not found 785 + * Return: pointer to property, or NULL if not found 779 786 */ 780 787 const void *ofnode_get_property(ofnode node, const char *propname, int *lenp); 781 788 ··· 787 794 * 788 795 * @node: node to read 789 796 * @prop: place to put argument reference 790 - * @return 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 797 + * Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 791 798 */ 792 799 int ofnode_get_first_property(ofnode node, struct ofprop *prop); 793 800 ··· 798 805 * and read all the property with ofnode_get_property_by_prop(). 799 806 * 800 807 * @prop: reference of current argument and place to put reference of next one 801 - * @return 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 808 + * Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 802 809 */ 803 810 int ofnode_get_next_property(struct ofprop *prop); 804 811 ··· 810 817 * @prop: reference on property 811 818 * @propname: If non-NULL, place to property name on success, 812 819 * @lenp: If non-NULL, place to put length on success 813 - * @return 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 820 + * Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found 814 821 */ 815 822 const void *ofnode_get_property_by_prop(const struct ofprop *prop, 816 823 const char **propname, int *lenp); ··· 819 826 * ofnode_is_available() - check if a node is marked available 820 827 * 821 828 * @node: node to check 822 - * @return true if node's 'status' property is "okay" (or is missing) 829 + * Return: true if node's 'status' property is "okay" (or is missing) 823 830 */ 824 831 bool ofnode_is_available(ofnode node); 825 832 ··· 832 839 * @node: node to read from 833 840 * @propname: property to read 834 841 * @sizep: place to put size value (on success) 835 - * @return address value, or FDT_ADDR_T_NONE on error 842 + * Return: address value, or FDT_ADDR_T_NONE on error 836 843 */ 837 844 phys_addr_t ofnode_get_addr_size(ofnode node, const char *propname, 838 845 phys_size_t *sizep); ··· 845 852 * for the array (count bytes). It may have more, but this will be ignored. 846 853 * The data is not copied. 847 854 * 848 - * @node node to examine 849 - * @propname name of property to find 850 - * @sz number of array elements 851 - * @return pointer to byte array if found, or NULL if the property is not 852 - * found or there is not enough data 855 + * @node: node to examine 856 + * @propname: name of property to find 857 + * @sz: number of array elements 858 + * Return: 859 + * pointer to byte array if found, or NULL if the property is not found or 860 + * there is not enough data 853 861 */ 854 862 const uint8_t *ofnode_read_u8_array_ptr(ofnode node, const char *propname, 855 863 size_t sz); ··· 861 869 * corresponds to the given type in the form of fdt_pci_addr. 862 870 * The property must hold one fdt_pci_addr with a lengh. 863 871 * 864 - * @node node to examine 865 - * @type pci address type (FDT_PCI_SPACE_xxx) 866 - * @propname name of property to find 867 - * @addr returns pci address in the form of fdt_pci_addr 868 - * @return 0 if ok, -ENOENT if the property did not exist, -EINVAL if the 869 - * format of the property was invalid, -ENXIO if the requested 870 - * address type was not found 872 + * @node: node to examine 873 + * @type: pci address type (FDT_PCI_SPACE_xxx) 874 + * @propname: name of property to find 875 + * @addr: returns pci address in the form of fdt_pci_addr 876 + * Return: 877 + * 0 if ok, -ENOENT if the property did not exist, -EINVAL if the 878 + * format of the property was invalid, -ENXIO if the requested 879 + * address type was not found 871 880 */ 872 881 int ofnode_read_pci_addr(ofnode node, enum fdt_pci_space type, 873 882 const char *propname, struct fdt_pci_addr *addr); ··· 878 887 * Look at the compatible property of a device node that represents a PCI 879 888 * device and extract pci vendor id and device id from it. 880 889 * 881 - * @param node node to examine 882 - * @param vendor vendor id of the pci device 883 - * @param device device id of the pci device 884 - * @return 0 if ok, negative on error 890 + * @node: node to examine 891 + * @vendor: vendor id of the pci device 892 + * @device: device id of the pci device 893 + * Return: 0 if ok, negative on error 885 894 */ 886 895 int ofnode_read_pci_vendev(ofnode node, u16 *vendor, u16 *device); 887 896 ··· 892 901 * which controls the given node. 893 902 * 894 903 * @node: Node to check 895 - * @return number of address cells this node uses 904 + * Return: number of address cells this node uses 896 905 */ 897 906 int ofnode_read_addr_cells(ofnode node); 898 907 ··· 903 912 * which controls the given node. 904 913 * 905 914 * @node: Node to check 906 - * @return number of size cells this node uses 915 + * Return: number of size cells this node uses 907 916 */ 908 917 int ofnode_read_size_cells(ofnode node); 909 918 ··· 912 921 * 913 922 * This function matches fdt_address_cells(). 914 923 * 915 - * @np: Node pointer to check 916 - * @return value of #address-cells property in this node, or 2 if none 924 + * @node: Node to check 925 + * Return: value of #address-cells property in this node, or 2 if none 917 926 */ 918 927 int ofnode_read_simple_addr_cells(ofnode node); 919 928 ··· 922 931 * 923 932 * This function matches fdt_size_cells(). 924 933 * 925 - * @np: Node pointer to check 926 - * @return value of #size-cells property in this node, or 2 if none 934 + * @node: Node to check 935 + * Return: value of #size-cells property in this node, or 2 if none 927 936 */ 928 937 int ofnode_read_simple_size_cells(ofnode node); 929 938 ··· 942 951 * There are 4 settings currently in use 943 952 * - u-boot,dm-pre-proper: U-Boot proper pre-relocation only 944 953 * - u-boot,dm-pre-reloc: legacy and indicates any of TPL or SPL 945 - * Existing platforms only use it to indicate nodes needed in 946 - * SPL. Should probably be replaced by u-boot,dm-spl for 947 - * new platforms. 954 + * Existing platforms only use it to indicate nodes needed in 955 + * SPL. Should probably be replaced by u-boot,dm-spl for new platforms. 948 956 * - u-boot,dm-spl: SPL and U-Boot pre-relocation 949 957 * - u-boot,dm-tpl: TPL and U-Boot pre-relocation 950 958 * 951 959 * @node: node to check 952 - * @return true if node is needed in SPL/TL, false otherwise 960 + * Return: true if node is needed in SPL/TL, false otherwise 953 961 */ 954 962 bool ofnode_pre_reloc(ofnode node); 955 963 ··· 961 969 * @node: Node to read from 962 970 * @index: Index of resource to read (0 = first) 963 971 * @res: Returns resource that was read, on success 964 - * @return 0 if OK, -ve on error 972 + * Return: 0 if OK, -ve on error 965 973 */ 966 974 int ofnode_read_resource(ofnode node, uint index, struct resource *res); 967 975 ··· 975 983 * @node: Node to read from 976 984 * @name: Name of resource to read 977 985 * @res: Returns resource that was read, on success 978 - * @return 0 if OK, -ve on error 986 + * Return: 0 if OK, -ve on error 979 987 */ 980 988 int ofnode_read_resource_byname(ofnode node, const char *name, 981 989 struct resource *res); ··· 987 995 * 988 996 * @from: ofnode to start from (use ofnode_null() to start at the beginning) 989 997 * @compat: Compatible string to match 990 - * @return ofnode found, or ofnode_null() if none 998 + * Return: ofnode found, or ofnode_null() if none 991 999 */ 992 1000 ofnode ofnode_by_compatible(ofnode from, const char *compat); 993 1001 ··· 998 1006 * @propval and a length @proplen. 999 1007 * 1000 1008 * @from: ofnode to start from (use ofnode_null() to start at the 1001 - * beginning) @propname: property name to check @propval: property value to 1002 - * search for @proplen: length of the value in propval @return ofnode 1003 - * found, or ofnode_null() if none 1009 + * beginning) 1010 + * @propname: property name to check 1011 + * @propval: property value to search for 1012 + * @proplen: length of the value in propval 1013 + * Return: ofnode found, or ofnode_null() if none 1004 1014 */ 1005 1015 ofnode ofnode_by_prop_value(ofnode from, const char *propname, 1006 1016 const void *propval, int proplen); ··· 1011 1021 * @node: child node (ofnode, lvalue) 1012 1022 * @parent: parent node (ofnode) 1013 1023 * 1014 - * This is a wrapper around a for loop and is used like so: 1024 + * This is a wrapper around a for loop and is used like so:: 1015 1025 * 1016 - * ofnode node; 1017 - * 1018 - * ofnode_for_each_subnode(node, parent) { 1019 - * Use node 1020 - * ... 1021 - * } 1026 + * ofnode node; 1027 + * ofnode_for_each_subnode(node, parent) { 1028 + * Use node 1029 + * ... 1030 + * } 1022 1031 * 1023 1032 * Note that this is implemented as a macro and @node is used as 1024 1033 * iterator in the loop. The parent variable can be a constant or even a ··· 1036 1045 * @node: child node (ofnode, lvalue) 1037 1046 * @compat: compatible string to match 1038 1047 * 1039 - * This is a wrapper around a for loop and is used like so: 1040 - * 1041 - * ofnode node; 1048 + * This is a wrapper around a for loop and is used like so:: 1042 1049 * 1043 - * ofnode_for_each_compatible_node(node, parent, compatible) { 1044 - * Use node 1045 - * ... 1046 - * } 1050 + * ofnode node; 1051 + * ofnode_for_each_compatible_node(node, parent, compatible) { 1052 + * Use node 1053 + * ... 1054 + * } 1047 1055 * 1048 1056 * Note that this is implemented as a macro and @node is used as 1049 1057 * iterator in the loop. ··· 1056 1064 /** 1057 1065 * ofnode_get_child_count() - get the child count of a ofnode 1058 1066 * 1059 - * @node: valid node to get its child count 1060 - * @return the number of subnodes 1067 + * @parent: valid node to get its child count 1068 + * Return: the number of subnodes 1061 1069 */ 1062 1070 int ofnode_get_child_count(ofnode parent); 1063 1071 ··· 1068 1076 * function walks up the tree and applies the various bus mappings along the 1069 1077 * way. 1070 1078 * 1071 - * @ofnode: Device tree node giving the context in which to translate the 1072 - * address 1079 + * @node: Device tree node giving the context in which to translate the address 1073 1080 * @in_addr: pointer to the address to translate 1074 - * @return the translated address; OF_BAD_ADDR on error 1081 + * Return: the translated address; OF_BAD_ADDR on error 1075 1082 */ 1076 1083 u64 ofnode_translate_address(ofnode node, const fdt32_t *in_addr); 1077 1084 ··· 1082 1089 * This function walks up the tree and applies the various bus mappings along 1083 1090 * the way. 1084 1091 * 1085 - * @ofnode: Device tree node giving the context in which to translate the 1086 - * DMA address 1092 + * @node: Device tree node giving the context in which to translate the 1093 + * DMA address 1087 1094 * @in_addr: pointer to the DMA address to translate 1088 - * @return the translated DMA address; OF_BAD_ADDR on error 1095 + * Return: the translated DMA address; OF_BAD_ADDR on error 1089 1096 */ 1090 1097 u64 ofnode_translate_dma_address(ofnode node, const fdt32_t *in_addr); 1091 1098 ··· 1095 1102 * Get DMA ranges for a specifc node, this is useful to perform bus->cpu and 1096 1103 * cpu->bus address translations 1097 1104 * 1098 - * @param blob Pointer to device tree blob 1099 - * @param node_offset Node DT offset 1100 - * @param cpu Pointer to variable storing the range's cpu address 1101 - * @param bus Pointer to variable storing the range's bus address 1102 - * @param size Pointer to variable storing the range's size 1103 - * @return translated DMA address or OF_BAD_ADDR on error 1105 + * @node: Device tree node 1106 + * @cpu: Pointer to variable storing the range's cpu address 1107 + * @bus: Pointer to variable storing the range's bus address 1108 + * @size: Pointer to variable storing the range's size 1109 + * Return: translated DMA address or OF_BAD_ADDR on error 1104 1110 */ 1105 1111 int ofnode_get_dma_range(ofnode node, phys_addr_t *cpu, dma_addr_t *bus, 1106 1112 u64 *size); ··· 1112 1118 * 1113 1119 * @node: Device tree node for which compatible needs to be verified. 1114 1120 * @compat: Compatible string which needs to verified in the given node. 1115 - * @return true if OK, false if the compatible is not found 1121 + * Return: true if OK, false if the compatible is not found 1116 1122 */ 1117 1123 int ofnode_device_is_compatible(ofnode node, const char *compat); 1118 1124 ··· 1127 1133 * @len: The length of the new value of the property 1128 1134 * @value: The new value of the property (must be valid prior to calling 1129 1135 * the function) 1130 - * @return 0 if successful, -ve on error 1136 + * Return: 0 if successful, -ve on error 1131 1137 */ 1132 1138 int ofnode_write_prop(ofnode node, const char *propname, int len, 1133 1139 const void *value); ··· 1142 1148 * @propname: The name of the string property to set 1143 1149 * @value: The new value of the string property (must be valid prior to 1144 1150 * calling the function) 1145 - * @return 0 if successful, -ve on error 1151 + * Return: 0 if successful, -ve on error 1146 1152 */ 1147 1153 int ofnode_write_string(ofnode node, const char *propname, const char *value); 1148 1154 ··· 1157 1163 * @node: The node to enable 1158 1164 * @value: Flag that tells the function to either disable or enable the 1159 1165 * node 1160 - * @return 0 if successful, -ve on error 1166 + * Return: 0 if successful, -ve on error 1161 1167 */ 1162 1168 int ofnode_set_enabled(ofnode node, bool value); 1163 1169 ··· 1168 1174 * 1169 1175 * See doc/config.txt for bindings 1170 1176 * 1171 - * @prop_name property name to look up 1172 - * @return true, if it exists, false if not 1177 + * @prop_name: property name to look up 1178 + * Return: true, if it exists, false if not 1173 1179 */ 1174 1180 bool ofnode_conf_read_bool(const char *prop_name); 1175 1181 ··· 1182 1188 * 1183 1189 * @prop_name: property name to look up 1184 1190 * @default_val: default value to return if the property is not found 1185 - * @return integer value, if found, or @default_val if not 1191 + * Return: integer value, if found, or @default_val if not 1186 1192 */ 1187 1193 int ofnode_conf_read_int(const char *prop_name, int default_val); 1188 1194 ··· 1194 1200 * See doc/config.txt for bindings 1195 1201 * 1196 1202 * @prop_name: property name to look up 1197 - * @return string value, if found, or NULL if not 1203 + * Return: string value, if found, or NULL if not 1198 1204 */ 1199 1205 const char *ofnode_conf_read_str(const char *prop_name); 1200 1206