Lines Matching refs:slave
35 * Note that the hardware is capable of running as both a master and a slave.
42 * must handle retries in a way that makes sense for the slave being addressed.
77 #define I2C_ADDR_REG 0x00 /* I2C slave address register */
85 #define I2CCR_MSTA (1 << 5) /* Master/slave mode */
91 #define I2CSR_MASS (1 << 6) /* Addressed as a slave */
144 u_int slave;
479 i2c_repeated_start(device_t dev, u_char slave, int timeout)
492 * before writing slave address, wait for ack after write.
497 i2c_write_reg(sc, I2C_DATA_REG, slave);
498 sc->slave = slave;
499 DEVICE_DEBUGF(sc, 2, "rstart 0x%02x\n", sc->slave);
505 i2c_start_ll(device_t dev, u_char slave, int timeout)
521 i2c_write_reg(sc, I2C_DATA_REG, slave);
522 sc->slave = slave;
523 DEVICE_DEBUGF(sc, 2, "start 0x%02x\n", sc->slave);
529 i2c_start(device_t dev, u_char slave, int timeout)
538 * the given slave. If that fails, idle the controller and attempt a
540 * addressing the slave is the only operation that a low-level driver
542 * more about the slave device.
544 if ((error = i2c_start_ll(dev, slave, timeout)) != 0) {
548 error = i2c_start_ll(dev, slave, timeout);
563 DEVICE_DEBUGF(sc, 2, "stop 0x%02x\n", sc->slave);
622 DEVICE_DEBUGF(sc, 1, "read 0x%02x len %d: ", sc->slave, len);
673 DEVICE_DEBUGF(sc, 1, "write 0x%02x len %d: ", sc->slave, len);