public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Support exporting SoC info from Rust
@ 2025-12-16 19:24 Matthew Maurer
  2025-12-16 19:24 ` [PATCH v3 1/3] rust: Add soc_device support Matthew Maurer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Matthew Maurer @ 2025-12-16 19:24 UTC (permalink / raw)
  To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Greg Kroah-Hartman, Rafael J. Wysocki
  Cc: linux-kernel, rust-for-linux, Matthew Maurer, Lee Jones

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.

Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
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/20251216-soc-bindings-v2-0-1fb394cc921a@google.com

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/20251212-soc-bindings-v1-0-db51044ce805@google.com

---
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                    |  82 +++++++++++++++++
 8 files changed, 236 insertions(+), 2 deletions(-)
---
base-commit: 008d3547aae5bc86fac3eda317489169c3fda112
change-id: 20251029-soc-bindings-9b0731bcdbed

Best regards,
-- 
Matthew Maurer <mmaurer@google.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-01-14  7:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-16 19:24 [PATCH v3 0/3] Support exporting SoC info from Rust Matthew Maurer
2025-12-16 19:24 ` [PATCH v3 1/3] rust: Add soc_device support Matthew Maurer
2025-12-17  2:31   ` Alexandre Courbot
2025-12-26 19:26     ` Matthew Maurer
2025-12-26 19:38       ` Matthew Maurer
2025-12-28 11:21         ` Miguel Ojeda
2026-01-14  7:54         ` Alexandre Courbot
2026-01-14  7:53       ` Alexandre Courbot
2025-12-16 19:24 ` [PATCH v3 2/3] docs: ABI: sysfs-devices-soc: Fix swapped sample values Matthew Maurer
2025-12-16 19:24 ` [PATCH v3 3/3] rust: Add SoC Driver Sample Matthew Maurer
2025-12-17  2:28   ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox