summaryrefslogtreecommitdiff
path: root/rust/kernel/types.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-12-19 20:04:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-20 19:19:25 +0300
commit9b90864bb42befdc10fa5c60dd1d8033c8535726 (patch)
treea5ddfbfc73abc7b7d881c65c4cd2db1404ba9934 /rust/kernel/types.rs
parentea7e18289f44b0aa597026f16e7f4f6daa0f13ee (diff)
downloadlinux-9b90864bb42befdc10fa5c60dd1d8033c8535726.tar.xz
rust: implement `IdArray`, `IdTable` and `RawDeviceId`
Most subsystems use some kind of ID to match devices and drivers. Hence, we have to provide Rust drivers an abstraction to register an ID table for the driver to match. Generally, those IDs are subsystem specific and hence need to be implemented by the corresponding subsystem. However, the `IdArray`, `IdTable` and `RawDeviceId` types provide a generalized implementation that makes the life of subsystems easier to do so. Co-developed-by: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Co-developed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Gary Guo <gary@garyguo.net> Co-developed-by: Fabien Parent <fabien.parent@linaro.org> Signed-off-by: Fabien Parent <fabien.parent@linaro.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-4-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/types.rs')
0 files changed, 0 insertions, 0 deletions