• Home
  • Raw
  • Download

Lines Matching refs:status

63 	int status;  in mv64x60_i2c_wait_for_status()  local
67 status = in_le32((u32 *)(ctlr_base + MV64x60_I2C_REG_STATUS)) in mv64x60_i2c_wait_for_status()
69 if (status == wanted) in mv64x60_i2c_wait_for_status()
70 return status; in mv64x60_i2c_wait_for_status()
72 return -status; in mv64x60_i2c_wait_for_status()
75 static int mv64x60_i2c_control(int control, int status) in mv64x60_i2c_control() argument
78 return mv64x60_i2c_wait_for_status(status); in mv64x60_i2c_control()
81 static int mv64x60_i2c_read_byte(int control, int status) in mv64x60_i2c_read_byte() argument
84 if (mv64x60_i2c_wait_for_status(status) < 0) in mv64x60_i2c_read_byte()
89 static int mv64x60_i2c_write_byte(int data, int control, int status) in mv64x60_i2c_write_byte() argument
93 return mv64x60_i2c_wait_for_status(status); in mv64x60_i2c_write_byte()
102 int status; in mv64x60_i2c_read() local
119 status = MV64x60_I2C_STATUS_MAST_START; in mv64x60_i2c_read()
120 if (mv64x60_i2c_control(control, status) < 0) in mv64x60_i2c_read()
126 status = MV64x60_I2C_STATUS_MAST_WR_ADDR_ACK; in mv64x60_i2c_read()
127 if (mv64x60_i2c_write_byte(data, control, status) < 0) in mv64x60_i2c_read()
132 status = MV64x60_I2C_STATUS_MAST_WR_ACK; in mv64x60_i2c_read()
134 if (mv64x60_i2c_write_byte(offset >> 8, control, status) < 0) in mv64x60_i2c_read()
137 if (mv64x60_i2c_write_byte(offset, control, status) < 0) in mv64x60_i2c_read()
142 status = MV64x60_I2C_STATUS_MAST_REPEAT_START; in mv64x60_i2c_read()
143 if (mv64x60_i2c_control(control, status) < 0) in mv64x60_i2c_read()
149 status = MV64x60_I2C_STATUS_MAST_RD_ADDR_ACK; in mv64x60_i2c_read()
150 if (mv64x60_i2c_write_byte(data, control, status) < 0) in mv64x60_i2c_read()
155 status = MV64x60_I2C_STATUS_MAST_RD_DATA_ACK; in mv64x60_i2c_read()
158 data = mv64x60_i2c_read_byte(control, status); in mv64x60_i2c_read()
168 status = MV64x60_I2C_STATUS_MAST_RD_DATA_NO_ACK; in mv64x60_i2c_read()
169 data = mv64x60_i2c_read_byte(control, status); in mv64x60_i2c_read()
176 status = MV64x60_I2C_STATUS_NO_STATUS; in mv64x60_i2c_read()
177 if (mv64x60_i2c_control(control, status) < 0) in mv64x60_i2c_read()