-
- Downloads
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 <fujita.tomonori@gmail.com> Signed-off-by:
FUJITA Tomonori <fujita.tomonori@gmail.com> Signed-off-by:
Danilo Krummrich <dakr@kernel.org>
Showing
- MAINTAINERS 1 addition, 0 deletionsMAINTAINERS
- rust/bindings/bindings_helper.h 1 addition, 0 deletionsrust/bindings/bindings_helper.h
- rust/helpers/helpers.c 1 addition, 0 deletionsrust/helpers/helpers.c
- rust/helpers/pci.c 18 additions, 0 deletionsrust/helpers/pci.c
- rust/kernel/lib.rs 2 additions, 0 deletionsrust/kernel/lib.rs
- rust/kernel/pci.rs 292 additions, 0 deletionsrust/kernel/pci.rs
Loading