public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@gmail.com>
To: Rob Herring <robh@kernel.org>, Dirk Behme <dirk.behme@de.bosch.com>
Cc: "Saravana Kannan" <saravanak@google.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH RFC v2 1/1] rust: Add bindings for device properties
Date: Mon, 25 Nov 2024 17:55:06 +0100	[thread overview]
Message-ID: <4d179a7a-3cf3-451c-9718-d20da6db69f6@gmail.com> (raw)
In-Reply-To: <CAL_JsqJ-cFq4jyFDnCWKy1b+7pNt8Tb11QF8vGoMb2G_4=dpBw@mail.gmail.com>

Hi Rob,

On 25.11.24 16:35, Rob Herring wrote:
> On Fri, Nov 22, 2024 at 2:13 AM Dirk Behme <dirk.behme@de.bosch.com> wrote:
>>
>> From: "Rob Herring (Arm)" <robh@kernel.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@de.bosch.com>
>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>> Signed-off-by: Rob Herring (Arm) <robh@kernel.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



      reply	other threads:[~2024-11-25 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22  8:12 [PATCH RFC v2 1/1] rust: Add bindings for device properties Dirk Behme
2024-11-22  8:47 ` Alice Ryhl
2024-11-25 15:35 ` Rob Herring
2024-11-25 16:55   ` Dirk Behme [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d179a7a-3cf3-451c-9718-d20da6db69f6@gmail.com \
    --to=dirk.behme@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dirk.behme@de.bosch.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=saravanak@google.com \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox