summaryrefslogtreecommitdiff
path: root/rust/kernel/platform.rs
diff options
context:
space:
mode:
authorRemo Senekowitsch <remo@buenzli.dev>2025-06-16 17:45:09 +0200
committerDanilo Krummrich <dakr@kernel.org>2025-06-25 17:18:07 +0200
commitc942dba38064cd35214c6b3249120f3f2945e810 (patch)
tree06b642dcebc097fa4fe6760edeb08e598ae4021f /rust/kernel/platform.rs
parent63dafeb392139b893a73b6331f347613f0929702 (diff)
rust: device: Add child accessor and iterator
Allow Rust drivers to access children of a fwnode either by name or by iterating over all of them. In C, there is the function `fwnode_get_next_child_node` for iteration and the macro `fwnode_for_each_child_node` that helps with handling the pointers. Instead of a macro, a native iterator is used in Rust such that regular for-loops can be used. Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Remo Senekowitsch <remo@buenzli.dev> Link: https://lore.kernel.org/r/20250616154511.1862909-2-remo@buenzli.dev Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/platform.rs')
0 files changed, 0 insertions, 0 deletions