[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4d179a7a-3cf3-451c-9718-d20da6db69f6@gmail.com>
Date: Mon, 25 Nov 2024 17:55:06 +0100
From: Dirk Behme <dirk.behme@...il.com>
To: Rob Herring <robh@...nel.org>, Dirk Behme <dirk.behme@...bosch.com>
Cc: Saravana Kannan <saravanak@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH RFC v2 1/1] rust: Add bindings for device properties
Hi Rob,
On 25.11.24 16:35, Rob Herring wrote:
> On Fri, Nov 22, 2024 at 2:13 AM Dirk Behme <dirk.behme@...bosch.com> wrote:
>>
>> From: "Rob Herring (Arm)" <robh@...nel.org>
>>
>> The device property API is a firmware agnostic API for reading
>> properties from firmware (DT/ACPI) devices nodes and swnodes.
>>
>> While the C API takes a pointer to a caller allocated variable/buffer,
>> the rust API is designed to return a value and can be used in struct
>> initialization. Rust generics are also utilized to support different
>> sizes of properties (e.g. u8, u16, u32).
>>
>> To build and run the Examples as `rustdoc` tests the kernel Kconfig
>> options `CONFIG_OF` and `CONFIG_OF_UNITTEST` need to be enabled
>> additionally. Besides the default `rustdoc` test options
>> `CONFIG_KUNIT` and `CONFIG_RUST_KERNEL_DOCTESTS`. This even works
>> on non-ARM architectures as a test device tree is built into the
>> kernel, then.
>>
>> The Integer trait is proposed by Alic Ryhl [1].
>>
>> Link: https://lore.kernel.org/rust-for-linux/CAH5fLgiXPZqKpWSSNdx-Ww-E9h2tOLcF3_8Y4C_JQ0eU8EMwFw@mail.gmail.com/ [1]
>> Co-developed-by: Dirk Behme <dirk.behme@...bosch.com>
>> Signed-off-by: Dirk Behme <dirk.behme@...bosch.com>
>> Signed-off-by: Rob Herring (Arm) <robh@...nel.org>
>> ---
>>
>> This is an update of Rob's initial patch
>
> I have my own updates on it based on the discussion. It's a bit
> different because I've reworked the C API to better mesh with Rust
> needs.
Great, that sounds really good!
> I just haven't sent it out because I've been busy with other
> things and it's the merge window.
No problem and totally understood!
> You asked me if I was going to work on this and I did. If you want to
> do it, just say so. I'm always happy for less work.
Sorry! I have worked on the review comments and thought sharing them
might help. If this is not the case, then sorry again. Of course,
please share what you have. And ignore this one, then.
Thanks
Dirk
Powered by blists - more mailing lists