summaryrefslogtreecommitdiff
path: root/rust/kernel/io.rs
diff options
context:
space:
mode:
authorDaniel Almeida <daniel.almeida@collabora.com>2025-07-17 12:55:22 -0300
committerDanilo Krummrich <dakr@kernel.org>2025-07-20 19:43:04 +0200
commit493fc33ec25294cb2e444dfa77c105aa774c83f2 (patch)
treecc3402f763e4847a0b6ce05a9363b8169467972f /rust/kernel/io.rs
parent931d9251e4855f79394357eb0071b5c4a189a8bd (diff)
rust: io: add resource abstraction
In preparation for ioremap support, add a Rust abstraction for struct resource. A future commit will introduce the Rust API to ioremap a resource from a platform device. The current abstraction, therefore, adds only the minimum API needed to get that done. Acked-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Co-developed-by: Fiona Behrens <me@kloenk.dev> Signed-off-by: Fiona Behrens <me@kloenk.dev> Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com> Link: https://lore.kernel.org/r/20250717-topics-tyr-platform_iomem-v15-1-beca780b77e3@collabora.com [ Capitalize safety comments and end it with a period. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/io.rs')
-rw-r--r--rust/kernel/io.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs
index 72d80a6f131e..7b70d5b5477e 100644
--- a/rust/kernel/io.rs
+++ b/rust/kernel/io.rs
@@ -7,6 +7,10 @@
use crate::error::{code::EINVAL, Result};
use crate::{bindings, build_assert};
+pub mod resource;
+
+pub use resource::Resource;
+
/// Raw representation of an MMIO region.
///
/// By itself, the existence of an instance of this structure does not provide any guarantees that