Re: [PATCH v3 4/4] samples: rust: add ACPI match table example to platform driver

From: Benno Lossin
Date: Sun Jun 08 2025 - 03:59:04 EST


On Fri Jun 6, 2025 at 7:10 PM CEST, Igor Korotin wrote:
> Extend the Rust sample platform driver to probe using device/driver name
> matching, OF ID table matching, or ACPI ID table matching.
>
> Signed-off-by: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
> ---
> samples/rust/rust_driver_platform.rs | 96 +++++++++++++++++++++++++++-
> 1 file changed, 95 insertions(+), 1 deletion(-)
>
> diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs
> index e3992e7a71e9..be7c311dca07 100644
> --- a/samples/rust/rust_driver_platform.rs
> +++ b/samples/rust/rust_driver_platform.rs
> @@ -17,10 +17,104 @@ struct SampleDriver {
> [(of::DeviceId::new(c_str!("test,rust-device")), Info(42))]
> );
>
> +// ACPI match table test

This looks great, let's move it to the crate-level documentation. That
way it gets rendered :)

---
Cheers,
Benno

> +//
> +// This demonstrates how to test an ACPI-based Rust platform driver using QEMU
> +// with a custom SSDT.
> +//
> +// Steps: