Re: [PATCH v3] rust/kernel: Add faux device bindings
From: Greg Kroah-Hartman
Date: Mon Feb 10 2025 - 06:31:17 EST
On Fri, Feb 07, 2025 at 06:49:25PM -0500, Lyude Paul wrote:
> This introduces a module for working with faux devices in rust, along with
> adding sample code to show how the API is used. Unlike other types of
> devices, we don't provide any hooks for device probe/removal - since these
> are optional for the faux API and are unnecessary in rust.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Maíra Canal <mairacanal@xxxxxxxxxx>
> Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
> Cc: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
>
> ---
> V2:
> * Check for NULL on return from device_create(), not a pointer error
> * Rename Device to Registration to make its purpose more clear
> * Drop platform device comment from crate docstring.
> * Update MAINTAINERS
> V3:
> * Clarify safety comment around thread-safety
> * Return ENODEV on failure from new()
> * Add missing newline in faux driver sample
> * s/crate/module/ in descriptions
> * Add newline after faux module docstring
> * Fix missing markdown in safety comments
> * Add missing INVARIANT: comment in Registration
> * s/Registration/faux::Registration/ in rust_driver_faux.rs
Thanks, I've taken this into my series and fixed up the api where I
added a "parent" pointer. I'll send it out in a bit...
thanks,
greg k-h