Lines Matching refs:oc_setreg
130 static inline void oc_setreg(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg() function
147 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); in ocores_process()
155 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); in ocores_process()
165 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); in ocores_process()
185 oc_setreg(i2c, OCI2C_DATA, addr); in ocores_process()
186 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START); in ocores_process()
193 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); in ocores_process()
199 oc_setreg(i2c, OCI2C_CMD, i2c->pos == (msg->len-1) ? in ocores_process()
202 oc_setreg(i2c, OCI2C_DATA, msg->buf[i2c->pos++]); in ocores_process()
203 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_WRITE); in ocores_process()
225 oc_setreg(i2c, OCI2C_DATA, i2c_8bit_addr_from_msg(i2c->msg)); in ocores_xfer()
226 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START); in ocores_xfer()
242 oc_setreg(i2c, OCI2C_CONTROL, ctrl & ~(OCI2C_CTRL_EN|OCI2C_CTRL_IEN)); in ocores_init()
255 oc_setreg(i2c, OCI2C_PRELOW, prescale & 0xff); in ocores_init()
256 oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8); in ocores_init()
259 oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); in ocores_init()
260 oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_IEN | OCI2C_CTRL_EN); in ocores_init()
515 oc_setreg(i2c, OCI2C_CONTROL, oc_getreg(i2c, OCI2C_CONTROL) in ocores_i2c_remove()
534 oc_setreg(i2c, OCI2C_CONTROL, ctrl & ~(OCI2C_CTRL_EN|OCI2C_CTRL_IEN)); in ocores_i2c_suspend()