Skip to content

rust: Add basic I2C driver abstractions

Igor Korotin linux-acpi linux-devicetree linux-i2c lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 4 patches 1 replyIn review

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] rust: Add basic I2C driver abstractions

This patch series introduces basic Rust I2C driver abstractions and optional ACPI match-table support and provides a sample driver demonstrating both OF and ACPI binding

Currently Rust I2C abstractions support only Open Firmware OF device matching. This series splits the work into four patches so that the core abstractions and sample driver can land immediately while ACPI integration may be reviewed once the ACPI macros are upstream

Changes include
- core I2C abstractions i2c::Device i2c::Driver i2c::Adapter built on struct i2c_client and struct i2c_driver
- a standalone Rust sample driver exercising Legacy I2C ID and OF ID matching
- optional ACPI ID-table support in the i2c::Driver abstraction
- ACPI-enabled sample driver showing kernel::acpi_device_table! usage

This separation lets maintainers review and merge the non-ACPI portions immediately while patches 3 and 4 both depending on the ACPI infrastructure can be queued once the ACPI macros are upstream

Patch series:

1 rust: i2c: add basic I2C device and driver abstractions 2 samples: rust: add I2C sample driver (OF only)
3 rust: i2c: support ACPI match-table in driver abstractions
Depends-on: [email protected] 4 samples: rust: show ACPI ID-table in I2C sample driver
Depends-on: [email protected]

Igor Korotin (4):
rust: i2c: add basic I2C device and driver abstractions
samples: rust: add Rust I2C sample driver
rust: i2c: ACPI ID-table support for I2C abstractions
samples: rust: show ACPI ID-table in I2C sample driver

 MAINTAINERS                     |   3 +
 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/i2c.c              |  15 ++
 rust/kernel/i2c.rs              | 386 ++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs              |   2 +
 samples/rust/Kconfig            |  11 +
 samples/rust/Makefile           |   1 +
 samples/rust/rust_driver_i2c.rs |  69 ++++++
 9 files changed, 489 insertions(+)
 create mode 100644 rust/helpers/i2c.c
 create mode 100644 rust/kernel/i2c.rs
 create mode 100644 samples/rust/rust_driver_i2c.rs

base-commit: 63dafeb392139b893a73b6331f347613f0929702

Signature · 1 line
2.43.0