Lines Matching defs:slave
27 #define I2C_OFS_SVA0 0x0c /* slave address */
71 struct i2c_client *slave;
149 /* Send slave address and R/W type */
157 /* Received NACK (result of setting slave address and R/W) */
234 if (!priv->slave)
245 /* Stop detected, we don't know if it's for slave or master */
247 /* Notify slave device */
248 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value);
270 i2c_slave_event(priv->slave, event, &value);
284 i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED,
289 ret = i2c_slave_event(priv->slave,
317 static int em_i2c_reg_slave(struct i2c_client *slave)
319 struct em_i2c_device *priv = i2c_get_adapdata(slave->adapter);
321 if (priv->slave)
324 if (slave->flags & I2C_CLIENT_TEN)
327 priv->slave = slave;
329 /* Set slave address */
330 writeb(slave->addr << 1, priv->base + I2C_OFS_SVA0);
335 static int em_i2c_unreg_slave(struct i2c_client *slave)
337 struct em_i2c_device *priv = i2c_get_adapdata(slave->adapter);
339 WARN_ON(!priv->slave);
344 * Wait for interrupt to finish. New slave irqs cannot happen because we
345 * cleared the slave address and, thus, only extension codes will be
346 * detected which do not use the slave ptr.
349 priv->slave = NULL;