Re: [PATCH] rust/kernel: Add faux device bindings
From: Danilo Krummrich
Date: Thu Feb 06 2025 - 17:39:45 EST
On Thu, Feb 06, 2025 at 11:30:30PM +0100, Danilo Krummrich wrote:
> On Thu, Feb 06, 2025 at 04:04:56PM -0500, Lyude Paul wrote:
> > This introduces a crate 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>
> > ---
> > rust/bindings/bindings_helper.h | 1 +
> > rust/kernel/faux.rs | 60 ++++++++++++++++++++++++++++++++
> > rust/kernel/lib.rs | 1 +
> > samples/rust/Kconfig | 10 ++++++
> > samples/rust/Makefile | 1 +
> > samples/rust/rust_driver_faux.rs | 29 +++++++++++++++
> > 6 files changed, 102 insertions(+)
> > create mode 100644 rust/kernel/faux.rs
> > create mode 100644 samples/rust/rust_driver_faux.rs
Forgot to mention, we should also add the new files to the MAINTAINERS file.