• Home
  • Raw
  • Download

Lines Matching refs:message

291 struct message {  struct
598 struct spi_message *message, void (*complete)(void *)) in applespi_async() argument
600 message->complete = complete; in applespi_async()
601 message->context = applespi; in applespi_async()
603 return spi_async(applespi->spi, message); in applespi_async()
753 struct message *message = (struct message *)packet->data; in applespi_send_cmd_msg() local
785 message->type = cpu_to_le16(0x1020); in applespi_send_cmd_msg()
786 msg_len = sizeof(message->tp_info_command); in applespi_send_cmd_msg()
788 message->zero = 0x02; in applespi_send_cmd_msg()
789 message->rsp_buf_len = cpu_to_le16(0x0200); in applespi_send_cmd_msg()
798 message->type = cpu_to_le16(0x0252); in applespi_send_cmd_msg()
799 msg_len = sizeof(message->init_mt_command); in applespi_send_cmd_msg()
801 message->init_mt_command.cmd = cpu_to_le16(0x0102); in applespi_send_cmd_msg()
811 message->type = cpu_to_le16(0x0151); in applespi_send_cmd_msg()
812 msg_len = sizeof(message->capsl_command); in applespi_send_cmd_msg()
814 message->capsl_command.unknown = 0x01; in applespi_send_cmd_msg()
815 message->capsl_command.led = applespi->have_cl_led_on ? 2 : 0; in applespi_send_cmd_msg()
825 message->type = cpu_to_le16(0xB051); in applespi_send_cmd_msg()
826 msg_len = sizeof(message->bl_command); in applespi_send_cmd_msg()
828 message->bl_command.const1 = cpu_to_le16(0x01B0); in applespi_send_cmd_msg()
829 message->bl_command.level = in applespi_send_cmd_msg()
833 message->bl_command.const2 = cpu_to_le16(0x01F4); in applespi_send_cmd_msg()
835 message->bl_command.const2 = cpu_to_le16(0x0001); in applespi_send_cmd_msg()
847 message->counter = applespi->cmd_msg_cntr++ % (U8_MAX + 1); in applespi_send_cmd_msg()
849 message->length = cpu_to_le16(msg_len - 2); in applespi_send_cmd_msg()
850 if (!message->rsp_buf_len) in applespi_send_cmd_msg()
851 message->rsp_buf_len = message->length; in applespi_send_cmd_msg()
853 crc = crc16(0, (u8 *)message, le16_to_cpu(packet->length) - 2); in applespi_send_cmd_msg()
854 put_unaligned_le16(crc, &message->data[msg_len - 2]); in applespi_send_cmd_msg()
1341 struct message *message) in applespi_handle_cmd_response() argument
1344 le16_to_cpu(message->type) == 0x1020) { in applespi_handle_cmd_response()
1349 applespi->rcvd_tp_info = message->tp_info; in applespi_handle_cmd_response()
1354 if (le16_to_cpu(message->length) != 0x0000) { in applespi_handle_cmd_response()
1357 le16_to_cpu(message->length)); in applespi_handle_cmd_response()
1362 le16_to_cpu(message->type) == 0x0252 && in applespi_handle_cmd_response()
1363 le16_to_cpu(message->rsp_buf_len) == 0x0002) in applespi_handle_cmd_response()
1407 struct message *message; in applespi_got_data() local
1476 message = (struct message *)applespi->msg_buf; in applespi_got_data()
1479 message = (struct message *)&packet->data; in applespi_got_data()
1484 if (!applespi_verify_crc(applespi, (u8 *)message, msg_len)) in applespi_got_data()
1487 if (le16_to_cpu(message->length) != msg_len - MSG_HEADER_SIZE - 2) { in applespi_got_data()
1490 le16_to_cpu(message->length), in applespi_got_data()
1498 applespi_handle_keyboard_event(applespi, &message->keyboard); in applespi_got_data()
1505 tp = &message->touchpad; in applespi_got_data()
1508 if (le16_to_cpu(message->length) + 2 != tp_len) { in applespi_got_data()
1511 le16_to_cpu(message->length), in applespi_got_data()
1527 applespi_handle_cmd_response(applespi, packet, message); in applespi_got_data()