|
|
Subscribe / Log in / New account

Add Rust bindings for device property child nodes and reference args

From:  Remo Senekowitsch <remo-AT-buenzli.dev>
To:  Rob Herring <robh-AT-kernel.org>, Saravana Kannan <saravanak-AT-google.com>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org>, "Rafael J. Wysocki" <rafael-AT-kernel.org>, Danilo Krummrich <dakr-AT-kernel.org>, Miguel Ojeda <ojeda-AT-kernel.org>, Alex Gaynor <alex.gaynor-AT-gmail.com>, Boqun Feng <boqun.feng-AT-gmail.com>, Gary Guo <gary-AT-garyguo.net>, Björn Roy Baron <bjorn3_gh-AT-protonmail.com>, Benno Lossin <lossin-AT-kernel.org>, Andreas Hindborg <a.hindborg-AT-kernel.org>, Alice Ryhl <aliceryhl-AT-google.com>, Trevor Gross <tmgross-AT-umich.edu>, Mark Brown <broonie-AT-kernel.org>, Dirk Behme <dirk.behme-AT-de.bosch.com>, Remo Senekowitsch <remo-AT-buenzli.dev>
Subject:  [PATCH v1 0/3] Add Rust bindings for device property child nodes and reference args
Date:  Mon, 16 Jun 2025 17:45:08 +0200
Message-ID:  <20250616154511.1862909-1-remo@buenzli.dev>
Cc:  devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, rust-for-linux-AT-vger.kernel.org
Archive-link:  Article

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...

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




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds