Lines Matching full: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()
121 /* Return the parent's functionality */
125 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_functionality() local
127 return parent->algo->functionality(parent); in i2c_mux_functionality()
133 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_lock_bus() local
135 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter)); in i2c_mux_lock_bus()
138 i2c_lock_bus(parent, flags); in i2c_mux_lock_bus()
144 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_trylock_bus() local
146 if (!rt_mutex_trylock(&parent->mux_lock)) in i2c_mux_trylock_bus()
150 if (i2c_trylock_bus(parent, flags)) in i2c_mux_trylock_bus()
151 return 1; /* parent locked too, success */ in i2c_mux_trylock_bus()
152 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_trylock_bus()
153 return 0; /* parent not locked, failure */ in i2c_mux_trylock_bus()
159 struct i2c_adapter *parent = priv->muxc->parent; in i2c_mux_unlock_bus() local
162 i2c_unlock_bus(parent, flags); in i2c_mux_unlock_bus()
163 rt_mutex_unlock(&parent->mux_lock); in i2c_mux_unlock_bus()
170 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_lock_bus() local
172 rt_mutex_lock_nested(&parent->mux_lock, i2c_adapter_depth(adapter)); in i2c_parent_lock_bus()
173 i2c_lock_bus(parent, flags); in i2c_parent_lock_bus()
180 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_trylock_bus() local
182 if (!rt_mutex_trylock(&parent->mux_lock)) in i2c_parent_trylock_bus()
184 if (i2c_trylock_bus(parent, flags)) in i2c_parent_trylock_bus()
185 return 1; /* parent locked too, success */ in i2c_parent_trylock_bus()
186 rt_mutex_unlock(&parent->mux_lock); in i2c_parent_trylock_bus()
187 return 0; /* parent not locked, failure */ in i2c_parent_trylock_bus()
194 struct i2c_adapter *parent = priv->muxc->parent; in i2c_parent_unlock_bus() local
196 i2c_unlock_bus(parent, flags); in i2c_parent_unlock_bus()
197 rt_mutex_unlock(&parent->mux_lock); in i2c_parent_unlock_bus()
210 for (i2c = dev; i2c; i2c = i2c->parent) { in i2c_root_adapter()
226 struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, in i2c_mux_alloc() argument
242 muxc->parent = parent; in i2c_mux_alloc()
273 struct i2c_adapter *parent = muxc->parent; in i2c_mux_add_adapter() local
294 if (parent->algo->master_xfer) { in i2c_mux_add_adapter()
300 if (parent->algo->master_xfer_atomic) in i2c_mux_add_adapter()
303 if (parent->algo->smbus_xfer) { in i2c_mux_add_adapter()
309 if (parent->algo->smbus_xfer_atomic) in i2c_mux_add_adapter()
316 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id); in i2c_mux_add_adapter()
320 priv->adap.dev.parent = &parent->dev; in i2c_mux_add_adapter()
321 priv->adap.retries = parent->retries; in i2c_mux_add_adapter()
322 priv->adap.timeout = parent->timeout; in i2c_mux_add_adapter()
323 priv->adap.quirks = parent->quirks; in i2c_mux_add_adapter()
384 dev_err(&parent->dev, in i2c_mux_add_adapter()
392 dev_err(&parent->dev, in i2c_mux_add_adapter()
407 dev_info(&parent->dev, "Added multiplexed i2c bus %d\n", in i2c_mux_add_adapter()