Lines Matching full:slave
3 * i2c slave support for Atmel's AT91 Two-Wire Interface (TWI)
25 /* slave address has been detected on I2C bus */ in atmel_twi_interrupt_slave()
28 i2c_slave_event(dev->slave, in atmel_twi_interrupt_slave()
34 i2c_slave_event(dev->slave, in atmel_twi_interrupt_slave()
44 i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED, &value); in atmel_twi_interrupt_slave()
51 i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED, &value); in atmel_twi_interrupt_slave()
59 i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &value); in atmel_twi_interrupt_slave()
65 static int at91_reg_slave(struct i2c_client *slave) in at91_reg_slave() argument
67 struct at91_twi_dev *dev = i2c_get_adapdata(slave->adapter); in at91_reg_slave()
69 if (dev->slave) in at91_reg_slave()
72 if (slave->flags & I2C_CLIENT_TEN) in at91_reg_slave()
78 dev->slave = slave; in at91_reg_slave()
79 dev->smr = AT91_TWI_SMR_SADR(slave->addr); in at91_reg_slave()
84 dev_info(dev->dev, "entered slave mode (ADR=%d)\n", slave->addr); in at91_reg_slave()
89 static int at91_unreg_slave(struct i2c_client *slave) in at91_unreg_slave() argument
91 struct at91_twi_dev *dev = i2c_get_adapdata(slave->adapter); in at91_unreg_slave()
93 WARN_ON(!dev->slave); in at91_unreg_slave()
95 dev_info(dev->dev, "leaving slave mode\n"); in at91_unreg_slave()
97 dev->slave = NULL; in at91_unreg_slave()