summaryrefslogtreecommitdiff
path: root/samples/rust/rust_i2c_client.rs
diff options
context:
space:
mode:
authorIgor Korotin <igor.korotin.linux@gmail.com>2025-11-16 16:21:44 +0000
committerDanilo Krummrich <dakr@kernel.org>2025-11-18 10:26:42 +1300
commit57c5bd9aee944b0f5c2ab314e10a86fae51f7bf2 (patch)
tree75731058140a29f5ec4639f9cd252575c80b8acb /samples/rust/rust_i2c_client.rs
parentdd6ff5cf56fb183fce605ca6a5bfce228cd8888b (diff)
rust: i2c: add basic I2C device and driver abstractions
Implement the core abstractions needed for I2C drivers, including: * `i2c::Driver` — the trait drivers must implement, including `probe` * `i2c::I2cClient` — a safe wrapper around `struct i2c_client` * `i2c::Adapter` — implements `driver::RegistrationOps` to hook into the generic `driver::Registration` machinery * `i2c::DeviceId` — a `RawDeviceIdIndex` implementation for I2C device IDs Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Igor Korotin <igor.korotin.linux@gmail.com> Link: https://patch.msgid.link/20251116162144.171469-1-igor.korotin.linux@gmail.com [ Remove unnecessary safety comment; fix rustdoc `Device` -> `I2cClient`. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'samples/rust/rust_i2c_client.rs')
0 files changed, 0 insertions, 0 deletions