Lines Matching refs:cmd

130 			const struct fsi_gpio_msg *cmd)  in serial_out()  argument
133 uint64_t msg = ~cmd->msg; /* Data is active low */ in serial_out()
134 uint64_t sda_mask = 0x1ULL << (cmd->bits - 1); in serial_out()
138 trace_fsi_master_gpio_out(master, cmd->bits, cmd->msg); in serial_out()
140 if (!cmd->bits) { in serial_out()
151 for (bit = 0; bit < cmd->bits; bit++) { in serial_out()
152 next_bit = (msg & sda_mask) >> (cmd->bits - 1); in serial_out()
235 struct fsi_gpio_msg *cmd, uint8_t id, in build_ar_command() argument
243 cmd->bits = 0; in build_ar_command()
244 cmd->msg = 0; in build_ar_command()
287 msg_push_bits(cmd, id, 2); in build_ar_command()
288 msg_push_bits(cmd, opcode, opcode_bits); in build_ar_command()
289 msg_push_bits(cmd, write ? 0 : 1, 1); in build_ar_command()
290 msg_push_bits(cmd, addr, addr_bits); in build_ar_command()
291 msg_push_bits(cmd, ds, 1); in build_ar_command()
293 msg_push_bits(cmd, ((uint8_t *)data)[i], 8); in build_ar_command()
295 msg_push_crc(cmd); in build_ar_command()
298 static void build_dpoll_command(struct fsi_gpio_msg *cmd, uint8_t slave_id) in build_dpoll_command() argument
300 cmd->bits = 0; in build_dpoll_command()
301 cmd->msg = 0; in build_dpoll_command()
303 msg_push_bits(cmd, slave_id, 2); in build_dpoll_command()
304 msg_push_bits(cmd, FSI_CMD_DPOLL, 3); in build_dpoll_command()
305 msg_push_crc(cmd); in build_dpoll_command()
308 static void build_epoll_command(struct fsi_gpio_msg *cmd, uint8_t slave_id) in build_epoll_command() argument
310 cmd->bits = 0; in build_epoll_command()
311 cmd->msg = 0; in build_epoll_command()
313 msg_push_bits(cmd, slave_id, 2); in build_epoll_command()
314 msg_push_bits(cmd, FSI_CMD_EPOLL, 3); in build_epoll_command()
315 msg_push_crc(cmd); in build_epoll_command()
318 static void build_term_command(struct fsi_gpio_msg *cmd, uint8_t slave_id) in build_term_command() argument
320 cmd->bits = 0; in build_term_command()
321 cmd->msg = 0; in build_term_command()
323 msg_push_bits(cmd, slave_id, 2); in build_term_command()
324 msg_push_bits(cmd, FSI_CMD_TERM, 6); in build_term_command()
325 msg_push_crc(cmd); in build_term_command()
399 struct fsi_gpio_msg cmd; in issue_term() local
404 build_term_command(&cmd, slave); in issue_term()
407 serial_out(master, &cmd); in issue_term()
427 struct fsi_gpio_msg response, cmd; in poll_for_response() local
450 build_epoll_command(&cmd, slave); in poll_for_response()
453 serial_out(master, &cmd); in poll_for_response()
481 build_dpoll_command(&cmd, slave); in poll_for_response()
484 serial_out(master, &cmd); in poll_for_response()
524 struct fsi_gpio_msg *cmd) in send_request() argument
532 serial_out(master, cmd); in send_request()
540 struct fsi_gpio_msg *cmd, size_t resp_len, void *resp) in fsi_master_gpio_xfer() argument
545 rc = send_request(master, cmd); in fsi_master_gpio_xfer()
565 struct fsi_gpio_msg cmd; in fsi_master_gpio_read() local
572 build_ar_command(master, &cmd, id, addr, size, NULL); in fsi_master_gpio_read()
573 rc = fsi_master_gpio_xfer(master, id, &cmd, size, val); in fsi_master_gpio_read()
584 struct fsi_gpio_msg cmd; in fsi_master_gpio_write() local
591 build_ar_command(master, &cmd, id, addr, size, val); in fsi_master_gpio_write()
592 rc = fsi_master_gpio_xfer(master, id, &cmd, 0, NULL); in fsi_master_gpio_write()
603 struct fsi_gpio_msg cmd; in fsi_master_gpio_term() local
610 build_term_command(&cmd, id); in fsi_master_gpio_term()
611 rc = fsi_master_gpio_xfer(master, id, &cmd, 0, NULL); in fsi_master_gpio_term()