THIS IS NOT A PROPOSAL TO LAND THIS SERIES
This is a demonstration of implementing a real driver that uses DebugFS,
primarily uploaded to serve as an example for API discussions on the
DebugFS series [1].
There are a number of rough edges (transmute, intra-module bindings) and
un-landed abstractions (SoC registration, randomness), but the main
purpose of this series is to look at sample usage of DebugFS in
* driver/soc/qcom/socinfo_rust/socinfo_rust_scoped.rs
* driver/soc/qcom/socinfo_rust/socinfo_rust_file.rs
to show how this would look in the two different APIs.
The example outputs byte-identical (as checked by recursive diff on
debugfs mounts) DebugFS files to the existing C driver. A real rewrite
would likely be simpler as it would be willing to not precisely mimic
newline quirks, etc.
[1] https://lore.kernel.org/all/20250819-debugfs-rust-v10-0-86e20f3cf3bb@google.com/
Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
Matthew Maurer (5):
rust: Add soc_device support
rust: transmute: Cleanup + Fixes
rust: Add support for feeding entropy to randomness pool
soc: qcom: socinfo: `File`-based example
soc: qcom: socinfo: `Scoped`-based example
MAINTAINERS | 1 +
drivers/soc/qcom/Kconfig | 12 +
drivers/soc/qcom/Makefile | 2 +
drivers/soc/qcom/smem.c | 9 +
drivers/soc/qcom/socinfo_rust/bindings.rs | 126 +++++
drivers/soc/qcom/socinfo_rust/data.rs | 387 +++++++++++++++
drivers/soc/qcom/socinfo_rust/socinfo_rust_file.rs | 538 +++++++++++++++++++++
.../soc/qcom/socinfo_rust/socinfo_rust_scoped.rs | 367 ++++++++++++++
rust/bindings/bindings_helper.h | 8 +
rust/kernel/lib.rs | 4 +
rust/kernel/rand.rs | 14 +
rust/kernel/soc.rs | 137 ++++++
rust/kernel/transmute.rs | 126 +++--
13 files changed, 1681 insertions(+), 50 deletions(-)
---
base-commit: f3c5631f70e434e318c44001e2417d4770f06cd0
change-id: 20250818-qcom-socinfo-c58407a81ac6
prerequisite-message-id: <20250811213851.65644-1-christiansantoslima21@gmail.com>
prerequisite-patch-id: 9448855f52cb137ad246ae5fde9eab12eac5da94
prerequisite-change-id: 20250428-debugfs-rust-3cd5c97eb7d1:v10
prerequisite-patch-id: 78c729bc8c164ce7a7c3ff841e720518a7f28c54
prerequisite-patch-id: ca7c06b342af0d1f5b03f8907206f8b69a189c9b
prerequisite-patch-id: f3e7541c4e907d874c8f303c2da14dd3aafe05f6
prerequisite-patch-id: e892f83de14710bea11f042ed874c05ccb3bc972
prerequisite-patch-id: ce8a5988c32a6491bc36e87fb33b2e9adf254db8
prerequisite-patch-id: 0762df7763820dd608da15dfbd8b5309d7692aa9
prerequisite-patch-id: 23da818045894ee8c6f2a7d8ade002ccfc96cc3a
prerequisite-patch-id: 2bfdaa7c29838c44d80003c623067051617f2b5e
Best regards,
--
Matthew Maurer <mmaurer@google.com>