wcd_spi_ctl_v01.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef WCD_SPI_CTL_V01_H
  5. #define WCD_SPI_CTL_V01_H
  6. #define WCD_SPI_CTL_SERVICE_ID_V01 0x421
  7. #define WCD_SPI_CTL_SERVICE_VERS_V01 0x01
  8. #define WCD_SPI_BUFF_RESP_V01 0x0022
  9. #define WCD_SPI_REL_ACCESS_RESP_V01 0x0021
  10. #define WCD_SPI_REQ_ACCESS_MSG_V01 0x0020
  11. #define WCD_SPI_BUFF_MSG_V01 0x0022
  12. #define WCD_SPI_REL_ACCESS_MSG_V01 0x0021
  13. #define WCD_SPI_REQ_ACCESS_RESP_V01 0x0020
  14. #define WCD_SPI_BUFF_CHANNELS_MAX_V01 0x08
  15. #define WCD_SPI_REQ_DATA_TRANSFER_V01 ((u64)0x01ULL)
  16. #define WCD_SPI_REQ_CONCURRENCY_V01 ((u64)0x02ULL)
  17. #define WCD_SPI_REQ_REMOTE_DOWN_V01 ((u64)0x04ULL)
  18. struct wcd_spi_req_access_msg_v01 {
  19. u8 reason_valid;
  20. u64 reason;
  21. };
  22. #define WCD_SPI_REQ_ACCESS_MSG_V01_MAX_MSG_LEN 11
  23. extern struct elem_info wcd_spi_req_access_msg_v01_ei[];
  24. struct wcd_spi_req_access_resp_v01 {
  25. struct qmi_response_type_v01 resp;
  26. };
  27. #define WCD_SPI_REQ_ACCESS_RESP_V01_MAX_MSG_LEN 7
  28. extern struct elem_info wcd_spi_req_access_resp_v01_ei[];
  29. struct wcd_spi_rel_access_msg_v01 {
  30. char placeholder;
  31. };
  32. #define WCD_SPI_REL_ACCESS_MSG_V01_MAX_MSG_LEN 0
  33. extern struct elem_info wcd_spi_rel_access_msg_v01_ei[];
  34. struct wcd_spi_rel_access_resp_v01 {
  35. struct qmi_response_type_v01 resp;
  36. };
  37. #define WCD_SPI_REL_ACCESS_RESP_V01_MAX_MSG_LEN 7
  38. extern struct elem_info wcd_spi_rel_access_resp_v01_ei[];
  39. struct wcd_spi_buff_msg_v01 {
  40. u32 buff_addr_1[WCD_SPI_BUFF_CHANNELS_MAX_V01];
  41. u8 buff_addr_2_valid;
  42. u32 buff_addr_2[WCD_SPI_BUFF_CHANNELS_MAX_V01];
  43. };
  44. #define WCD_SPI_BUFF_MSG_V01_MAX_MSG_LEN 70
  45. extern struct elem_info wcd_spi_buff_msg_v01_ei[];
  46. struct wcd_spi_buff_resp_v01 {
  47. struct qmi_response_type_v01 resp;
  48. };
  49. #define WCD_SPI_BUFF_RESP_V01_MAX_MSG_LEN 7
  50. extern struct elem_info wcd_spi_buff_resp_v01_ei[];
  51. #endif