Lines Matching refs:msg

45 	uint64_t	msg;  member
112 static void serial_in(struct fsi_master_gpio *master, struct fsi_gpio_msg *msg, in serial_in() argument
121 msg->msg <<= 1; in serial_in()
122 msg->msg |= ~in_bit & 0x1; /* Data is active low */ in serial_in()
124 msg->bits += num_bits; in serial_in()
126 trace_fsi_master_gpio_in(master, num_bits, msg->msg); in serial_in()
133 uint64_t msg = ~cmd->msg; /* Data is active low */ in serial_out() local
138 trace_fsi_master_gpio_out(master, cmd->bits, cmd->msg); in serial_out()
152 next_bit = (msg & sda_mask) >> (cmd->bits - 1); in serial_out()
158 msg <<= 1; in serial_out()
162 static void msg_push_bits(struct fsi_gpio_msg *msg, uint64_t data, int bits) in msg_push_bits() argument
164 msg->msg <<= bits; in msg_push_bits()
165 msg->msg |= data & ((1ull << bits) - 1); in msg_push_bits()
166 msg->bits += bits; in msg_push_bits()
169 static void msg_push_crc(struct fsi_gpio_msg *msg) in msg_push_crc() argument
174 top = msg->bits & 0x3; in msg_push_crc()
177 crc = crc4(0, 1 << top | msg->msg >> (msg->bits - top), top + 1); in msg_push_crc()
180 crc = crc4(crc, msg->msg, msg->bits - top); in msg_push_crc()
182 msg_push_bits(msg, crc, 4); in msg_push_crc()
244 cmd->msg = 0; in build_ar_command()
301 cmd->msg = 0; in build_dpoll_command()
311 cmd->msg = 0; in build_epoll_command()
321 cmd->msg = 0; in build_term_command()
337 struct fsi_gpio_msg msg; in read_one_response() local
347 msg.bits = 0; in read_one_response()
348 msg.msg = 0; in read_one_response()
349 serial_in(master, &msg, 1); in read_one_response()
350 if (msg.msg) in read_one_response()
360 msg.bits = 0; in read_one_response()
361 msg.msg = 0; in read_one_response()
364 serial_in(master, &msg, 4); in read_one_response()
366 tag = msg.msg & 0x3; in read_one_response()
370 serial_in(master, &msg, data_size * 8); in read_one_response()
373 serial_in(master, &msg, FSI_CRC_SIZE); in read_one_response()
379 crc = crc4(crc, msg.msg, msg.bits); in read_one_response()
382 if (((~msg.msg) & ((1ull << msg.bits) - 1)) == 0) in read_one_response()
385 msg.msg, msg.bits); in read_one_response()
390 *msgp = msg; in read_one_response()
463 uint64_t val = response.msg; in poll_for_response()
499 dev_dbg(master->dev, "ERRA received: 0x%x\n", (int)response.msg); in poll_for_response()
503 dev_dbg(master->dev, "ERRC received: 0x%x\n", (int)response.msg); in poll_for_response()