Skip to content

Support exporting SoC info from Rust

Matthew Maurer lkml rust-for-linux 4 versions – Applied

Status from this message: Applied to driver-core-linus, thanks!

Get series with b4
b4 am [email protected] change-id 20251029-soc-bindings-9b0731bcdbed

Versions newest first

  1. v4 Latest3 patches 6 repliesApplied
  2. v33 patches 7 repliesSuperseded
  3. v23 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Switched c_str!("foo") usage to c"foo"
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3rust: Add soc_device supportMAINTAINERS rust/bindings/bindings_helper.h rust/kernel/lib.rs +1 more+139 -00 replies
2/3docs: ABI: sysfs-devices-soc: Fix swapped sample valuesDocumentation/ABI/testing/sysfs-devices-soc+2 -23 replies
3/3rust: Add SoC Driver SampleMAINTAINERS samples/rust/Kconfig samples/rust/Makefile +1 more+94 -02 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchLee Jones
1/3
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] Support exporting SoC info from Rust

This is a fairly straightforward binding of soc_device_register and soc_device_unregister which allows a driver to export basic info about a SoC.

The last patch is a sample demonstrating usage, and can be dropped without issue.

---
Changes in v4:
- Switched c_str!("foo") usage to c"foo"
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Renamed Registration::register to Registration::new
- Inlined registration function and avoided this usage, per Danilo's suggestion.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Switch to new import style
- Increased documentation. Some of this had to be gathered by looking at what is done in practice at the moment, as documentation was absent or did not match code.
- Remove Device intermediate abstraction
- Removed unnecessary pinning of BuiltDeviceAttributes - it only needs
to be pinned for registration, not to exist.
- Aesthetic renames (Attributes pluralization, dropping Device,
etc.)
- Use more representative values for attributes in the sample driver
- Fix swap of example values in the documentation for machine vs family
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Matthew Maurer (3):
rust: Add soc_device support
docs: ABI: sysfs-devices-soc: Fix swapped sample values
rust: Add SoC Driver Sample

 Documentation/ABI/testing/sysfs-devices-soc |   4 +-
 MAINTAINERS                                 |   2 +
 rust/bindings/bindings_helper.h             |   1 +
 rust/kernel/lib.rs                          |   2 +
 rust/kernel/soc.rs                          | 135 ++++++++++++++++++++++++++++
 samples/rust/Kconfig                        |  11 +++
 samples/rust/Makefile                       |   1 +
 samples/rust/rust_soc.rs                    |  81 +++++++++++++++++
 8 files changed, 235 insertions(+), 2 deletions(-)

---
base-commit: 008d3547aae5bc86fac3eda317489169c3fda112
change-id: 20251029-soc-bindings-9b0731bcdbed

Best regards,

Signature · 1 line
Matthew Maurer <[email protected]>