Lines Matching defs:adapter
9 * each multiplexed bus segment as an additional I2C adapter.
143 static void i2c_mux_lock_bus(struct i2c_adapter *adapter, unsigned int flags)
145 struct i2c_mux_priv *priv = adapter->algo_data;
148 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter));
154 static int i2c_mux_trylock_bus(struct i2c_adapter *adapter, unsigned int flags)
156 struct i2c_mux_priv *priv = adapter->algo_data;
169 static void i2c_mux_unlock_bus(struct i2c_adapter *adapter, unsigned int flags)
171 struct i2c_mux_priv *priv = adapter->algo_data;
179 static void i2c_parent_lock_bus(struct i2c_adapter *adapter,
182 struct i2c_mux_priv *priv = adapter->algo_data;
185 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter));
189 static int i2c_parent_trylock_bus(struct i2c_adapter *adapter,
192 struct i2c_mux_priv *priv = adapter->algo_data;
203 static void i2c_parent_unlock_bus(struct i2c_adapter *adapter,
206 struct i2c_mux_priv *priv = adapter->algo_data;
219 * Walk up the device tree to find an i2c adapter, indicating
230 /* Continue up the tree to find the root i2c adapter */
247 muxc = devm_kzalloc(dev, struct_size(muxc, adapter, max_adapters)
252 muxc->priv = &muxc->adapter[max_adapters];
300 /* Set up private adapter data */
305 * of time what sort of physical adapter we'll be dealing with.
327 /* Now fill out new adapter structure */
351 * Try to populate the mux adapter's of_node, expands to
406 "failed to add mux-adapter %u as bus %u (error=%d)\n",
414 "failed to add mux-adapter %u (error=%d)\n",
431 muxc->adapter[muxc->num_adapters++] = &priv->adap;
445 struct i2c_adapter *adap = muxc->adapter[--muxc->num_adapters];
449 muxc->adapter[muxc->num_adapters] = NULL;