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:54 +0000
committerDanilo Krummrich <dakr@kernel.org>2025-11-18 10:28:19 +1300
commitf3cc26a417b77a07ff4418f7621dd318a1c533b1 (patch)
tree52e8b1e2db1d9780ca7e926bbbf7bd61f1fe2cc0 /samples/rust/rust_i2c_client.rs
parent57c5bd9aee944b0f5c2ab314e10a86fae51f7bf2 (diff)
rust: i2c: add manual I2C device creation abstractions
In addition to the basic I2C device support, add rust abstractions upon `i2c_new_client_device`/`i2c_unregister_device` C functions. Implement the core abstractions needed for manual creation/deletion of I2C devices, including: * `i2c::Registration` — a NonNull pointer created by the function `i2c_new_client_device` * `i2c::I2cAdapter` — a ref counted wrapper around `struct i2c_adapter` * `i2c::I2cBoardInfo` — a safe wrapper around `struct i2c_board_info` Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Igor Korotin <igor.korotin.linux@gmail.com> Link: https://patch.msgid.link/20251116162154.171493-1-igor.korotin.linux@gmail.com [ Remove unnecessary safety comment. - 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