Lines Matching defs:i2c_adapter
371 /// This structure represents the Rust abstraction for a C `struct i2c_adapter`. The
372 /// implementation abstracts the usage of an existing C `struct i2c_adapter` that
377 /// A [`I2cAdapter`] instance represents a valid `struct i2c_adapter` created by the C portion of
381 Opaque<bindings::i2c_adapter>,
386 fn as_raw(&self) -> *mut bindings::i2c_adapter {
395 // SAFETY: `self.as_raw` is a valid pointer to a `struct i2c_adapter`.
399 /// Gets pointer to an `i2c_adapter` by index.
406 // SAFETY: `adapter` is non-null and points to a live `i2c_adapter`.
560 i2c_adapter: &I2cAdapter,
564 Devres::new(parent_dev, Self::try_new(i2c_adapter, i2c_board_info))
567 fn try_new(i2c_adapter: &I2cAdapter, i2c_board_info: &I2cBoardInfo) -> Result<Self> {
572 bindings::i2c_new_client_device(i2c_adapter.as_raw(), i2c_board_info.as_raw())