diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2024-12-19 18:04:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-20 17:21:05 +0100 |
| commit | 683a63befc7385bf7f19ba30fc0b4b14961114c5 (patch) | |
| tree | d5ab2f4e95a1416b160309a2d1a5b0e4b931f5e3 /rust/bindings/bindings_helper.h | |
| parent | 7a718a1f26d1697465f0f4e402a69e29d6c4dd33 (diff) | |
rust: platform: add basic platform device / driver abstractions
Implement the basic platform bus abstractions required to write a basic
platform driver. This includes the following data structures:
The `platform::Driver` trait represents the interface to the driver and
provides `platform::Driver::probe` for the driver to implement.
The `platform::Device` abstraction represents a `struct platform_device`.
In order to provide the platform bus specific parts to a generic
`driver::Registration` the `driver::RegistrationOps` trait is implemented
by `platform::Adapter`.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Link: https://lore.kernel.org/r/20241219170425.12036-15-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/bindings/bindings_helper.h')
| -rw-r--r-- | rust/bindings/bindings_helper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 8fe70183a392..e9fdceb568b8 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -24,6 +24,7 @@ #include <linux/pci.h> #include <linux/phy.h> #include <linux/pid_namespace.h> +#include <linux/platform_device.h> #include <linux/poll.h> #include <linux/refcount.h> #include <linux/sched.h> |