Lines Matching refs:parent

44 	struct i2c_adapter *parent = muxc->parent;  in __i2c_mux_master_xfer()  local
51 ret = __i2c_transfer(parent, msgs, num); in __i2c_mux_master_xfer()
63 struct i2c_adapter *parent = muxc->parent; in i2c_mux_master_xfer() local
70 ret = i2c_transfer(parent, msgs, num); in i2c_mux_master_xfer()
84 struct i2c_adapter *parent = muxc->parent; in __i2c_mux_smbus_xfer() local
91 ret = __i2c_smbus_xfer(parent, addr, flags, in __i2c_mux_smbus_xfer()
106 struct i2c_adapter *parent = muxc->parent; in i2c_mux_smbus_xfer() local
113 ret = i2c_smbus_xfer(parent, addr, flags, in i2c_mux_smbus_xfer()
125 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_functionality() local
127 return parent->algo->functionality(parent); in i2c_mux_functionality()
131 static unsigned int i2c_mux_parent_classes(struct i2c_adapter *parent) in i2c_mux_parent_classes() argument
136 class |= parent->class; in i2c_mux_parent_classes()
137 parent = i2c_parent_is_i2c_adapter(parent); in i2c_mux_parent_classes()
138 } while (parent); in i2c_mux_parent_classes()
146 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_lock_bus() local
148 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter)); in i2c_mux_lock_bus()
151 i2c_lock_bus(parent, flags); in i2c_mux_lock_bus()
157 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_trylock_bus() local
159 if (!rt_mutex_trylock(&parent->mux_lock)) in i2c_mux_trylock_bus()
163 if (i2c_trylock_bus(parent, flags)) in i2c_mux_trylock_bus()
165 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_trylock_bus()
172 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_unlock_bus() local
175 i2c_unlock_bus(parent, flags); in i2c_mux_unlock_bus()
176 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_unlock_bus()
183 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_lock_bus() local
185 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter)); in i2c_parent_lock_bus()
186 i2c_lock_bus(parent, flags); in i2c_parent_lock_bus()
193 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_trylock_bus() local
195 if (!rt_mutex_trylock(&parent->mux_lock)) in i2c_parent_trylock_bus()
197 if (i2c_trylock_bus(parent, flags)) in i2c_parent_trylock_bus()
199 rt_mutex_unlock(&parent->mux_lock); in i2c_parent_trylock_bus()
207 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_unlock_bus() local
209 i2c_unlock_bus(parent, flags); in i2c_parent_unlock_bus()
210 rt_mutex_unlock(&parent->mux_lock); in i2c_parent_unlock_bus()
225 struct i2c_adapter *parent = muxc->parent; in i2c_mux_lock_select() local
227 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter)); in i2c_mux_lock_select()
229 adapter = parent->mux_root_ops->lock_select(parent); in i2c_mux_lock_select()
235 parent->mux_root_ops->unlock_deselect(parent); in i2c_mux_lock_select()
236 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_lock_select()
247 struct i2c_adapter *parent = muxc->parent; in i2c_mux_unlock_deselect() local
252 parent->mux_root_ops->unlock_deselect(parent); in i2c_mux_unlock_deselect()
253 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_unlock_deselect()
266 for (i2c = dev; i2c; i2c = i2c->parent) { in i2c_root_adapter()
282 struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, in i2c_mux_alloc() argument
298 muxc->parent = parent; in i2c_mux_alloc()
335 struct i2c_adapter *parent = muxc->parent; in i2c_mux_add_adapter() local
356 if (parent->algo->master_xfer) { in i2c_mux_add_adapter()
362 if (parent->algo->master_xfer_atomic) in i2c_mux_add_adapter()
365 if (parent->algo->smbus_xfer) { in i2c_mux_add_adapter()
371 if (parent->algo->smbus_xfer_atomic) in i2c_mux_add_adapter()
378 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id); in i2c_mux_add_adapter()
382 priv->adap.dev.parent = &parent->dev; in i2c_mux_add_adapter()
383 priv->adap.retries = parent->retries; in i2c_mux_add_adapter()
384 priv->adap.timeout = parent->timeout; in i2c_mux_add_adapter()
385 priv->adap.quirks = parent->quirks; in i2c_mux_add_adapter()
394 if (i2c_mux_parent_classes(parent) & class & ~I2C_CLASS_DEPRECATED) in i2c_mux_add_adapter()
395 dev_err(&parent->dev, in i2c_mux_add_adapter()
456 dev_err(&parent->dev, in i2c_mux_add_adapter()
464 dev_err(&parent->dev, in i2c_mux_add_adapter()
479 dev_info(&parent->dev, "Added multiplexed i2c bus %d\n", in i2c_mux_add_adapter()