This makes it possible to support drivers that use fwnode_property_get_reference_args() function.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -332,16 +332,44 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, · 331 unmodified lines | |||
| 332 | /* -------------------------------------------------------------------------- */ | 332 | /* -------------------------------------------------------------------------- */ |
| 333 | /* Software fwnode support - when HW description is incomplete or missing */ | 333 | /* Software fwnode support - when HW description is incomplete or missing */ |
| 334 | 334 | ||
| 335 | struct software_node; | ||
| 336 | |||
| 337 | /** | ||
| 338 | * struct software_node_ref_args - Reference with additional arguments | ||
| 339 | * @node: Reference to a software node | ||
| 340 | * @nargs: Number of elements in @args array | ||
| 341 | * @args: Integer arguments | ||
| 342 | */ | ||
| 343 | struct software_node_ref_args { | ||
| 344 | const struct software_node *node; | ||
| 345 | unsigned int nargs; | ||
| 346 | u64 args[NR_FWNODE_REFERENCE_ARGS]; | ||
| 347 | }; | ||
| 348 | |||
| 349 | /** | ||
| 350 | * struct software_node_reference - Named software node reference property | ||
| 351 | * @name: Name of the property | ||
| 352 | * @nrefs: Number of elements in @refs array | ||
| 353 | * @refs: Array of references with optional arguments | ||
| 354 | */ | ||
| 355 | struct software_node_reference { | ||
| 356 | const char *name; | ||
| 357 | unsigned int nrefs; | ||
| 358 | const struct software_node_ref_args *refs; | ||
| 359 | }; | ||
| 360 | |||
| 335 | /** | 361 | /** |
| 336 | * struct software_node - Software node description | 362 | * struct software_node - Software node description |
| 337 | * @name: Name of the software node | 363 | * @name: Name of the software node |
| 338 | * @parent: Parent of the software node | 364 | * @parent: Parent of the software node |
| 339 | * @properties: Array of device properties | 365 | * @properties: Array of device properties |
| 366 | * @references: Array of software node reference properties | ||
| 340 | */ | 367 | */ |
| 341 | struct software_node { | 368 | struct software_node { |
| 342 | const char *name; | 369 | const char *name; |
| 343 | const struct software_node *parent; | 370 | const struct software_node *parent; |
| 344 | const struct property_entry *properties; | 371 | const struct property_entry *properties; |
| 372 | const struct software_node_reference *references; | ||
| 345 | }; | 373 | }; |
| 346 | 374 | ||
| 347 | bool is_software_node(const struct fwnode_handle *fwnode); | 375 | bool is_software_node(const struct fwnode_handle *fwnode); |