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()
223 for (i2c = dev; i2c; i2c = i2c->parent) { in i2c_root_adapter()
239 struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, in i2c_mux_alloc() argument
255 muxc->parent = parent; in i2c_mux_alloc()
287 struct i2c_adapter *parent = muxc->parent; in i2c_mux_add_adapter() local
308 if (parent->algo->master_xfer) { in i2c_mux_add_adapter()
314 if (parent->algo->master_xfer_atomic) in i2c_mux_add_adapter()
317 if (parent->algo->smbus_xfer) { in i2c_mux_add_adapter()
323 if (parent->algo->smbus_xfer_atomic) in i2c_mux_add_adapter()
330 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id); in i2c_mux_add_adapter()
334 priv->adap.dev.parent = &parent->dev; in i2c_mux_add_adapter()
335 priv->adap.retries = parent->retries; in i2c_mux_add_adapter()
336 priv->adap.timeout = parent->timeout; in i2c_mux_add_adapter()
337 priv->adap.quirks = parent->quirks; in i2c_mux_add_adapter()
344 if (i2c_mux_parent_classes(parent) & class) in i2c_mux_add_adapter()
345 dev_err(&parent->dev, in i2c_mux_add_adapter()
406 dev_err(&parent->dev, in i2c_mux_add_adapter()
414 dev_err(&parent->dev, in i2c_mux_add_adapter()
429 dev_info(&parent->dev, "Added multiplexed i2c bus %d\n", in i2c_mux_add_adapter()