Lines Matching refs:cmd

152 static const char *pulse8_msgname(u8 cmd)  in pulse8_msgname()  argument
156 if ((cmd & 0x3f) < ARRAY_SIZE(pulse8_msgnames)) in pulse8_msgname()
157 return pulse8_msgnames[cmd & 0x3f]; in pulse8_msgname()
158 snprintf(unknown_msg, sizeof(unknown_msg), "0x%02x", cmd); in pulse8_msgname()
233 const u8 *cmd, u8 cmd_len, in pulse8_send_and_wait_once() argument
240 pulse8_msgname(cmd[0]), cmd_len, cmd); in pulse8_send_and_wait_once()
243 err = pulse8_send(pulse8->serio, cmd, cmd_len); in pulse8_send_and_wait_once()
250 cmd[0] != MSGCODE_SET_CONTROLLED && in pulse8_send_and_wait_once()
251 cmd[0] != MSGCODE_SET_AUTO_ENABLED && in pulse8_send_and_wait_once()
252 cmd[0] != MSGCODE_GET_BUILDDATE) in pulse8_send_and_wait_once()
257 pulse8_msgname(cmd[0]), in pulse8_send_and_wait_once()
265 const u8 *cmd, u8 cmd_len, u8 response, u8 size) in pulse8_send_and_wait() argument
270 err = pulse8_send_and_wait_once(pulse8, cmd, cmd_len, response, size); in pulse8_send_and_wait()
279 err = pulse8_send_and_wait_once(pulse8, cmd, cmd_len, in pulse8_send_and_wait()
289 u8 cmd[2]; in pulse8_tx_work_handler() local
296 cmd[0] = MSGCODE_TRANSMIT_IDLETIME; in pulse8_tx_work_handler()
297 cmd[1] = pulse8->tx_signal_free_time; in pulse8_tx_work_handler()
298 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_tx_work_handler()
300 cmd[0] = MSGCODE_TRANSMIT_ACK_POLARITY; in pulse8_tx_work_handler()
301 cmd[1] = cec_msg_is_broadcast(msg); in pulse8_tx_work_handler()
304 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_tx_work_handler()
306 cmd[0] = msg->len == 1 ? MSGCODE_TRANSMIT_EOM : MSGCODE_TRANSMIT; in pulse8_tx_work_handler()
307 cmd[1] = msg->msg[0]; in pulse8_tx_work_handler()
309 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_tx_work_handler()
313 cmd[0] = ((i == msg->len - 1)) ? in pulse8_tx_work_handler()
315 cmd[1] = msg->msg[i]; in pulse8_tx_work_handler()
316 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_tx_work_handler()
322 pulse8_msgname(cmd[0]), cmd[1], in pulse8_tx_work_handler()
485 u8 cmd[16]; in pulse8_cec_adap_enable() local
489 cmd[0] = MSGCODE_SET_CONTROLLED; in pulse8_cec_adap_enable()
490 cmd[1] = enable; in pulse8_cec_adap_enable()
491 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_cec_adap_enable()
506 u8 cmd[16]; in pulse8_cec_adap_log_addr() local
512 cmd[0] = MSGCODE_SET_ACK_MASK; in pulse8_cec_adap_log_addr()
513 cmd[1] = mask >> 8; in pulse8_cec_adap_log_addr()
514 cmd[2] = mask & 0xff; in pulse8_cec_adap_log_addr()
515 err = pulse8_send_and_wait(pulse8, cmd, 3, in pulse8_cec_adap_log_addr()
520 cmd[0] = MSGCODE_SET_AUTO_ENABLED; in pulse8_cec_adap_log_addr()
521 cmd[1] = log_addr == CEC_LOG_ADDR_INVALID ? 0 : 1; in pulse8_cec_adap_log_addr()
522 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_cec_adap_log_addr()
526 pulse8->autonomous = cmd[1]; in pulse8_cec_adap_log_addr()
530 cmd[0] = MSGCODE_SET_DEVICE_TYPE; in pulse8_cec_adap_log_addr()
531 cmd[1] = adap->log_addrs.primary_device_type[0]; in pulse8_cec_adap_log_addr()
532 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_cec_adap_log_addr()
563 cmd[0] = MSGCODE_SET_LOGICAL_ADDRESS_MASK; in pulse8_cec_adap_log_addr()
564 cmd[1] = mask >> 8; in pulse8_cec_adap_log_addr()
565 cmd[2] = mask & 0xff; in pulse8_cec_adap_log_addr()
566 err = pulse8_send_and_wait(pulse8, cmd, 3, in pulse8_cec_adap_log_addr()
571 cmd[0] = MSGCODE_SET_DEFAULT_LOGICAL_ADDRESS; in pulse8_cec_adap_log_addr()
572 cmd[1] = log_addr; in pulse8_cec_adap_log_addr()
573 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_cec_adap_log_addr()
578 cmd[0] = MSGCODE_SET_PHYSICAL_ADDRESS; in pulse8_cec_adap_log_addr()
579 cmd[1] = pa >> 8; in pulse8_cec_adap_log_addr()
580 cmd[2] = pa & 0xff; in pulse8_cec_adap_log_addr()
581 err = pulse8_send_and_wait(pulse8, cmd, 3, in pulse8_cec_adap_log_addr()
587 cmd[0] = MSGCODE_SET_HDMI_VERSION; in pulse8_cec_adap_log_addr()
588 cmd[1] = adap->log_addrs.cec_version; in pulse8_cec_adap_log_addr()
589 err = pulse8_send_and_wait(pulse8, cmd, 2, in pulse8_cec_adap_log_addr()
597 char *osd_str = cmd + 1; in pulse8_cec_adap_log_addr()
599 cmd[0] = MSGCODE_SET_OSD_NAME; in pulse8_cec_adap_log_addr()
600 strscpy(cmd + 1, adap->log_addrs.osd_name, sizeof(cmd) - 1); in pulse8_cec_adap_log_addr()
608 err = pulse8_send_and_wait(pulse8, cmd, 1 + osd_len, in pulse8_cec_adap_log_addr()
667 u8 cmd[2]; in pulse8_setup() local
673 cmd[0] = MSGCODE_FIRMWARE_VERSION; in pulse8_setup()
674 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 2); in pulse8_setup()
684 cmd[0] = MSGCODE_GET_BUILDDATE; in pulse8_setup()
685 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 4); in pulse8_setup()
692 cmd[0] = MSGCODE_GET_AUTO_ENABLED; in pulse8_setup()
693 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 1); in pulse8_setup()
701 cmd[0] = MSGCODE_GET_AUTO_POWER_ON; in pulse8_setup()
702 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 1); in pulse8_setup()
708 cmd[0] = MSGCODE_GET_DEVICE_TYPE; in pulse8_setup()
709 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 1); in pulse8_setup()
751 cmd[0] = MSGCODE_GET_LOGICAL_ADDRESS_MASK; in pulse8_setup()
752 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 2); in pulse8_setup()
761 cmd[0] = MSGCODE_GET_PHYSICAL_ADDRESS; in pulse8_setup()
762 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 1); in pulse8_setup()
771 cmd[0] = MSGCODE_GET_HDMI_VERSION; in pulse8_setup()
772 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 1); in pulse8_setup()
779 cmd[0] = MSGCODE_GET_OSD_NAME; in pulse8_setup()
780 err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 0); in pulse8_setup()
808 u8 cmd; in pulse8_ping_eeprom_work_handler() local
811 cmd = MSGCODE_PING; in pulse8_ping_eeprom_work_handler()
812 if (pulse8_send_and_wait(pulse8, &cmd, 1, in pulse8_ping_eeprom_work_handler()
823 cmd = MSGCODE_WRITE_EEPROM; in pulse8_ping_eeprom_work_handler()
824 if (pulse8_send_and_wait(pulse8, &cmd, 1, in pulse8_ping_eeprom_work_handler()