From f20fd5449ada3872dcd67aca397f0e27ca2e8ad6 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 13 Dec 2023 09:42:08 +0900 Subject: rust: core abstractions for network PHY drivers This patch adds abstractions to implement network PHY drivers; the driver registration and bindings for some of callback functions in struct phy_driver and many genphy_ functions. This feature is enabled with CONFIG_RUST_PHYLIB_ABSTRACTIONS=y. This patch enables unstable const_maybe_uninit_zeroed feature for kernel crate to enable unsafe code to handle a constant value with uninitialized data. With the feature, the abstractions can initialize a phy_driver structure with zero easily; instead of initializing all the members by hand. It's supposed to be stable in the not so distant future. Link: https://github.com/rust-lang/rust/pull/116218 Signed-off-by: FUJITA Tomonori Reviewed-by: Andrew Lunn Reviewed-by: Alice Ryhl Signed-off-by: David S. Miller --- rust/bindings/bindings_helper.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rust/bindings') diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 85f013ed4ca4..eaf01df7d97a 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -8,6 +8,9 @@ #include #include +#include +#include +#include #include #include #include -- cgit v1.2.3