Skip to content

Commit 15c3522

Browse files
committed
rust: i2c: add method to retrieve raw client pointer
Signed-off-by: Fabien Parent <[email protected]>
1 parent 5f894b9 commit 15c3522

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rust/kernel/i2c.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ impl Client {
208208
// INVARIANT: The safety requirements of the function ensure the lifetime invariant.
209209
Self { ptr }
210210
}
211+
212+
/// Returns the raw I2C client structure
213+
pub fn raw_client(&self) -> *mut bindings::i2c_client {
214+
self.ptr
215+
}
211216
}
212217

213218
unsafe impl RawDevice for Client {

0 commit comments

Comments
 (0)