diff options
| author | Danilo Krummrich <[email protected]> | 2024-12-19 17:04:11 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-12-20 16:19:26 +0000 |
| commit | 1bd8b6b2c5d38d9881d59928b986eacba40f9da8 (patch) | |
| tree | afb38d2b839dcc9cb630f5fa813788a35755f0b9 /rust/helpers/helpers.c | |
| parent | rust: add devres abstraction (diff) | |
| download | kernel-1bd8b6b2c5d38d9881d59928b986eacba40f9da8.tar.gz kernel-1bd8b6b2c5d38d9881d59928b986eacba40f9da8.zip | |
rust: pci: add basic PCI device / driver abstractions
Implement the basic PCI abstractions required to write a basic PCI
driver. This includes the following data structures:
The `pci::Driver` trait represents the interface to the driver and
provides `pci::Driver::probe` for the driver to implement.
The `pci::Device` abstraction represents a `struct pci_dev` and provides
abstractions for common functions, such as `pci::Device::set_master`.
In order to provide the PCI specific parts to a generic
`driver::Registration` the `driver::RegistrationOps` trait is implemented
by `pci::Adapter`.
`pci::DeviceId` implements PCI device IDs based on the generic
`device_id::RawDevceId` abstraction.
Co-developed-by: FUJITA Tomonori <[email protected]>
Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Tested-by: Dirk Behme <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
| -rw-r--r-- | rust/helpers/helpers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c index a3b52aa021de..3fda33cd42d4 100644 --- a/rust/helpers/helpers.c +++ b/rust/helpers/helpers.c @@ -20,6 +20,7 @@ #include "kunit.c" #include "mutex.c" #include "page.c" +#include "pci.c" #include "pid_namespace.c" #include "rbtree.c" #include "rcu.c" |
