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()
768 struct message *message = (struct message *)packet->data; in applespi_send_cmd_msg() local
800 message->type = cpu_to_le16(0x1020); in applespi_send_cmd_msg()
801 msg_len = sizeof(message->tp_info_command); in applespi_send_cmd_msg()
803 message->zero = 0x02; in applespi_send_cmd_msg()
804 message->rsp_buf_len = cpu_to_le16(0x0200); in applespi_send_cmd_msg()
813 message->type = cpu_to_le16(0x0252); in applespi_send_cmd_msg()
814 msg_len = sizeof(message->init_mt_command); in applespi_send_cmd_msg()
816 message->init_mt_command.cmd = cpu_to_le16(0x0102); in applespi_send_cmd_msg()
826 message->type = cpu_to_le16(0x0151); in applespi_send_cmd_msg()
827 msg_len = sizeof(message->capsl_command); in applespi_send_cmd_msg()
829 message->capsl_command.unknown = 0x01; in applespi_send_cmd_msg()
830 message->capsl_command.led = applespi->have_cl_led_on ? 2 : 0; in applespi_send_cmd_msg()
840 message->type = cpu_to_le16(0xB051); in applespi_send_cmd_msg()
841 msg_len = sizeof(message->bl_command); in applespi_send_cmd_msg()
843 message->bl_command.const1 = cpu_to_le16(0x01B0); in applespi_send_cmd_msg()
844 message->bl_command.level = in applespi_send_cmd_msg()
848 message->bl_command.const2 = cpu_to_le16(0x01F4); in applespi_send_cmd_msg()
850 message->bl_command.const2 = cpu_to_le16(0x0001); in applespi_send_cmd_msg()
862 message->counter = applespi->cmd_msg_cntr++ % (U8_MAX + 1); in applespi_send_cmd_msg()
864 message->length = cpu_to_le16(msg_len - 2); in applespi_send_cmd_msg()
865 if (!message->rsp_buf_len) in applespi_send_cmd_msg()
866 message->rsp_buf_len = message->length; in applespi_send_cmd_msg()
868 crc = crc16(0, (u8 *)message, le16_to_cpu(packet->length) - 2); in applespi_send_cmd_msg()
869 put_unaligned_le16(crc, &message->data[msg_len - 2]); in applespi_send_cmd_msg()
1356 struct message *message) in applespi_handle_cmd_response() argument
1359 le16_to_cpu(message->type) == 0x1020) { in applespi_handle_cmd_response()
1364 applespi->rcvd_tp_info = message->tp_info; in applespi_handle_cmd_response()
1369 if (le16_to_cpu(message->length) != 0x0000) { in applespi_handle_cmd_response()
1372 le16_to_cpu(message->length)); in applespi_handle_cmd_response()
1377 le16_to_cpu(message->type) == 0x0252 && in applespi_handle_cmd_response()
1378 le16_to_cpu(message->rsp_buf_len) == 0x0002) in applespi_handle_cmd_response()
1422 struct message *message; in applespi_got_data() local
1491 message = (struct message *)applespi->msg_buf; in applespi_got_data()
1494 message = (struct message *)&packet->data; in applespi_got_data()
1499 if (!applespi_verify_crc(applespi, (u8 *)message, msg_len)) in applespi_got_data()
1502 if (le16_to_cpu(message->length) != msg_len - MSG_HEADER_SIZE - 2) { in applespi_got_data()
1505 le16_to_cpu(message->length), in applespi_got_data()
1513 applespi_handle_keyboard_event(applespi, &message->keyboard); in applespi_got_data()
1520 tp = &message->touchpad; in applespi_got_data()
1523 if (le16_to_cpu(message->length) + 2 != tp_len) { in applespi_got_data()
1526 le16_to_cpu(message->length), in applespi_got_data()
1542 applespi_handle_cmd_response(applespi, packet, message); in applespi_got_data()