Lines Matching refs:message

300 struct message {  struct
611 struct spi_message *message, void (*complete)(void *)) in applespi_async() argument
613 message->complete = complete; in applespi_async()
614 message->context = applespi; in applespi_async()
616 return spi_async(applespi->spi, message); in applespi_async()
764 struct message *message = (struct message *)packet->data; in applespi_send_cmd_msg() local
796 message->type = cpu_to_le16(0x1020); in applespi_send_cmd_msg()
797 msg_len = sizeof(message->tp_info_command); in applespi_send_cmd_msg()
799 message->zero = 0x02; in applespi_send_cmd_msg()
800 message->rsp_buf_len = cpu_to_le16(0x0200); in applespi_send_cmd_msg()
809 message->type = cpu_to_le16(0x0252); in applespi_send_cmd_msg()
810 msg_len = sizeof(message->init_mt_command); in applespi_send_cmd_msg()
812 message->init_mt_command.cmd = cpu_to_le16(0x0102); in applespi_send_cmd_msg()
822 message->type = cpu_to_le16(0x0151); in applespi_send_cmd_msg()
823 msg_len = sizeof(message->capsl_command); in applespi_send_cmd_msg()
825 message->capsl_command.unknown = 0x01; in applespi_send_cmd_msg()
826 message->capsl_command.led = applespi->have_cl_led_on ? 2 : 0; in applespi_send_cmd_msg()
836 message->type = cpu_to_le16(0xB051); in applespi_send_cmd_msg()
837 msg_len = sizeof(message->bl_command); in applespi_send_cmd_msg()
839 message->bl_command.const1 = cpu_to_le16(0x01B0); in applespi_send_cmd_msg()
840 message->bl_command.level = in applespi_send_cmd_msg()
844 message->bl_command.const2 = cpu_to_le16(0x01F4); in applespi_send_cmd_msg()
846 message->bl_command.const2 = cpu_to_le16(0x0001); in applespi_send_cmd_msg()
858 message->counter = applespi->cmd_msg_cntr++ % (U8_MAX + 1); in applespi_send_cmd_msg()
860 message->length = cpu_to_le16(msg_len - 2); in applespi_send_cmd_msg()
861 if (!message->rsp_buf_len) in applespi_send_cmd_msg()
862 message->rsp_buf_len = message->length; in applespi_send_cmd_msg()
864 crc = crc16(0, (u8 *)message, le16_to_cpu(packet->length) - 2); in applespi_send_cmd_msg()
865 put_unaligned_le16(crc, &message->data[msg_len - 2]); in applespi_send_cmd_msg()
1337 struct message *message) in applespi_handle_cmd_response() argument
1340 le16_to_cpu(message->type) == 0x1020) { in applespi_handle_cmd_response()
1345 applespi->rcvd_tp_info = message->tp_info; in applespi_handle_cmd_response()
1350 if (le16_to_cpu(message->length) != 0x0000) { in applespi_handle_cmd_response()
1353 le16_to_cpu(message->length)); in applespi_handle_cmd_response()
1358 le16_to_cpu(message->type) == 0x0252 && in applespi_handle_cmd_response()
1359 le16_to_cpu(message->rsp_buf_len) == 0x0002) in applespi_handle_cmd_response()
1403 struct message *message; in applespi_got_data() local
1468 message = (struct message *)applespi->msg_buf; in applespi_got_data()
1471 message = (struct message *)&packet->data; in applespi_got_data()
1476 if (!applespi_verify_crc(applespi, (u8 *)message, msg_len)) in applespi_got_data()
1479 if (le16_to_cpu(message->length) != msg_len - MSG_HEADER_SIZE - 2) { in applespi_got_data()
1482 le16_to_cpu(message->length), in applespi_got_data()
1490 applespi_handle_keyboard_event(applespi, &message->keyboard); in applespi_got_data()
1497 tp = &message->touchpad; in applespi_got_data()
1500 if (le16_to_cpu(message->length) + 2 != tp_len) { in applespi_got_data()
1503 le16_to_cpu(message->length), in applespi_got_data()
1519 applespi_handle_cmd_response(applespi, packet, message); in applespi_got_data()