summaryrefslogtreecommitdiff
path: root/rust/bindings/bindings_helper.h
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-12-19 18:04:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-20 17:21:05 +0100
commit7a718a1f26d1697465f0f4e402a69e29d6c4dd33 (patch)
treec6dd21f602cecee841c94fe3144f044affaff5a8 /rust/bindings/bindings_helper.h
parentbbe3b4d1580dac8ea0e1451e38d1be9590a89ddc (diff)
rust: driver: implement `Adapter`
In order to not duplicate code in bus specific implementations (e.g. platform), implement a generic `driver::Adapter` to represent the connection of matched drivers and devices. Bus specific `Adapter` implementations can simply implement this trait to inherit generic functionality, such as matching OF or ACPI device IDs and ID table entries. Suggested-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-14-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 6d7a68e2ecb7..8fe70183a392 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -20,6 +20,7 @@
#include <linux/jump_label.h>
#include <linux/mdio.h>
#include <linux/miscdevice.h>
+#include <linux/of_device.h>
#include <linux/pci.h>
#include <linux/phy.h>
#include <linux/pid_namespace.h>