Lines Matching defs:slave
34 #define ICSCR 0x00 /* slave ctrl */
36 #define ICSSR 0x08 /* slave status */
38 #define ICSIER 0x10 /* slave irq enable */
41 #define ICSAR 0x1C /* slave address */
48 #define SDBS BIT(3) /* slave data buffer select */
49 #define SIE BIT(2) /* slave interface enable */
65 #define STM BIT(5) /* slave transmit mode */
67 #define SDE BIT(3) /* slave data empty */
68 #define SDT BIT(2) /* slave data transmitted */
69 #define SDR BIT(1) /* slave data received */
70 #define SAR BIT(0) /* slave addr received */
79 #define MAT BIT(0) /* slave addr xfer done */
133 struct i2c_client *slave;
457 dev_dbg(dev, "dma prep slave sg failed, using PIO\n");
602 i2c_slave_event(priv->slave, I2C_SLAVE_READ_REQUESTED, &value);
606 i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
617 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value);
628 ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
636 i2c_slave_event(priv->slave, I2C_SLAVE_READ_PROCESSED, &value);
948 static int rcar_reg_slave(struct i2c_client *slave)
950 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
952 if (priv->slave)
955 if (slave->flags & I2C_CLIENT_TEN)
958 /* Keep device active for slave address detection logic */
961 priv->slave = slave;
962 rcar_i2c_write(priv, ICSAR, slave->addr);
970 static int rcar_unreg_slave(struct i2c_client *slave)
972 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
974 WARN_ON(!priv->slave);
982 rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
984 priv->slave = NULL;
1095 rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */