[PATCH v1 0/3] Add Rust bindings for device property child nodes and reference args

Remo Senekowitsch posted 3 patches 3 months, 3 weeks ago
drivers/of/unittest-data/tests-platform.dtsi |   7 +
rust/kernel/device/property.rs               | 158 +++++++++++++++++++
samples/rust/rust_driver_platform.rs         |  13 +-
3 files changed, 177 insertions(+), 1 deletion(-)
[PATCH v1 0/3] Add Rust bindings for device property child nodes and reference args
Posted by Remo Senekowitsch 3 months, 3 weeks ago
This patch series was split-off from an earlier one. [1]

changes in v1 (compared to previous patch series):
* Fix resource leak of `FwNodeReferenceArgs`.
* Improve documentation of the type invariants of `FwNodeReferenceArgs`
  and how they are upheld at crate-internal use-sites.
* Remove derived implementation of `Clone` of `FwNodeReferenceArgs`.
  It would be unsafe according to the new type invariants.
* Add `Debug` implementation for `FwNodeReferenceArgs`.
* Add examples.

Best regards,
Remo

[1] https://lore.kernel.org/lkml/20250611102908.212514-1-remo@buenzli.dev/

Remo Senekowitsch (3):
  rust: device: Add child accessor and iterator
  rust: device: Add property_get_reference_args
  samples: rust: platform: Add property child and reference args
    examples

 drivers/of/unittest-data/tests-platform.dtsi |   7 +
 rust/kernel/device/property.rs               | 158 +++++++++++++++++++
 samples/rust/rust_driver_platform.rs         |  13 +-
 3 files changed, 177 insertions(+), 1 deletion(-)

-- 
2.49.0
Re: [PATCH v1 0/3] Add Rust bindings for device property child nodes and reference args
Posted by Danilo Krummrich 3 months, 2 weeks ago
On Mon, Jun 16, 2025 at 05:45:08PM +0200, Remo Senekowitsch wrote:
> This patch series was split-off from an earlier one. [1]
> 
> [1] https://lore.kernel.org/lkml/20250611102908.212514-1-remo@buenzli.dev/

Applied to driver-core-testing, thanks!

> Remo Senekowitsch (3):
>   rust: device: Add child accessor and iterator
>   rust: device: Add property_get_reference_args

    [ Move up NArgs; refer to FwNodeReferenceArgs in NArgs doc-comment.
      - Danilo ]

>   samples: rust: platform: Add property child and reference args
>     examples

    [ Convert 'child@{0,1}' to 'child-{0,1}'; skip child nodes without
      'compatible' property in of_unittest_platform_populate() as proposed
      by Rob Herring. - Danilo]