^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __QCOM_PDR_HELPER_INTERNAL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __QCOM_PDR_HELPER_INTERNAL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/soc/qcom/pdr.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define SERVREG_LOCATOR_SERVICE 0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define SERVREG_NOTIFIER_SERVICE 0x42
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define SERVREG_REGISTER_LISTENER_REQ 0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define SERVREG_GET_DOMAIN_LIST_REQ 0x21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define SERVREG_STATE_UPDATED_IND_ID 0x22
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define SERVREG_SET_ACK_REQ 0x23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define SERVREG_RESTART_PD_REQ 0x24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define SERVREG_DOMAIN_LIST_LENGTH 32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define SERVREG_RESTART_PD_REQ_MAX_LEN 67
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define SERVREG_REGISTER_LISTENER_REQ_LEN 71
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define SERVREG_SET_ACK_REQ_LEN 72
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN 74
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define SERVREG_STATE_UPDATED_IND_MAX_LEN 79
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define SERVREG_GET_DOMAIN_LIST_RESP_MAX_LEN 2389
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) struct servreg_location_entry {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) char name[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) u8 service_data_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) u32 service_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) u32 instance;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct qmi_elem_info servreg_location_entry_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) .tlv_type = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) .offset = offsetof(struct servreg_location_entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) .data_type = QMI_UNSIGNED_4_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) .elem_size = sizeof(u32),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) .tlv_type = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) .offset = offsetof(struct servreg_location_entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) instance),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) .data_type = QMI_UNSIGNED_1_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) .tlv_type = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) .offset = offsetof(struct servreg_location_entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) service_data_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) .data_type = QMI_UNSIGNED_4_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) .elem_size = sizeof(u32),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) .tlv_type = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) .offset = offsetof(struct servreg_location_entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) service_data),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) struct servreg_get_domain_list_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) char service_name[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) u8 domain_offset_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) u32 domain_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) struct qmi_elem_info servreg_get_domain_list_req_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) .tlv_type = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) .offset = offsetof(struct servreg_get_domain_list_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) service_name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) .data_type = QMI_OPT_FLAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) .offset = offsetof(struct servreg_get_domain_list_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) domain_offset_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) .data_type = QMI_UNSIGNED_4_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) .elem_size = sizeof(u32),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) .offset = offsetof(struct servreg_get_domain_list_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) domain_offset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct servreg_get_domain_list_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct qmi_response_type_v01 resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) u8 total_domains_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) u16 total_domains;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) u8 db_rev_count_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) u16 db_rev_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) u8 domain_list_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) u32 domain_list_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) struct servreg_location_entry domain_list[SERVREG_DOMAIN_LIST_LENGTH];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct qmi_elem_info servreg_get_domain_list_resp_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) .data_type = QMI_STRUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) .elem_size = sizeof(struct qmi_response_type_v01),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) resp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) .ei_array = qmi_response_type_v01_ei,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) .data_type = QMI_OPT_FLAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) total_domains_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) .data_type = QMI_UNSIGNED_2_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) .elem_size = sizeof(u16),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) total_domains),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) .data_type = QMI_OPT_FLAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) .tlv_type = 0x11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) db_rev_count_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) .data_type = QMI_UNSIGNED_2_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) .elem_size = sizeof(u16),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) .tlv_type = 0x11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) db_rev_count),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) .data_type = QMI_OPT_FLAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) .tlv_type = 0x12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) domain_list_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) .data_type = QMI_DATA_LEN,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) .tlv_type = 0x12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) domain_list_len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) .data_type = QMI_STRUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) .elem_len = SERVREG_DOMAIN_LIST_LENGTH,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) .elem_size = sizeof(struct servreg_location_entry),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) .array_type = VAR_LEN_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) .tlv_type = 0x12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) .offset = offsetof(struct servreg_get_domain_list_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) domain_list),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) .ei_array = servreg_location_entry_ei,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) struct servreg_register_listener_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) u8 enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) char service_path[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) struct qmi_elem_info servreg_register_listener_req_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) .data_type = QMI_UNSIGNED_1_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) .tlv_type = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) .offset = offsetof(struct servreg_register_listener_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) enable),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) .offset = offsetof(struct servreg_register_listener_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) service_path),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) struct servreg_register_listener_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) struct qmi_response_type_v01 resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) u8 curr_state_valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) enum servreg_service_state curr_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) struct qmi_elem_info servreg_register_listener_resp_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) .data_type = QMI_STRUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) .elem_size = sizeof(struct qmi_response_type_v01),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) .offset = offsetof(struct servreg_register_listener_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) resp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) .ei_array = qmi_response_type_v01_ei,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) .data_type = QMI_OPT_FLAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) .elem_size = sizeof(u8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) .offset = offsetof(struct servreg_register_listener_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) curr_state_valid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) .data_type = QMI_SIGNED_4_BYTE_ENUM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) .elem_size = sizeof(enum servreg_service_state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) .tlv_type = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) .offset = offsetof(struct servreg_register_listener_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) curr_state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) struct servreg_restart_pd_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) char service_path[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) struct qmi_elem_info servreg_restart_pd_req_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) .tlv_type = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) .offset = offsetof(struct servreg_restart_pd_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) service_path),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) struct servreg_restart_pd_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) struct qmi_response_type_v01 resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) struct qmi_elem_info servreg_restart_pd_resp_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) .data_type = QMI_STRUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) .elem_size = sizeof(struct qmi_response_type_v01),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) .offset = offsetof(struct servreg_restart_pd_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) resp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) .ei_array = qmi_response_type_v01_ei,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) struct servreg_state_updated_ind {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) enum servreg_service_state curr_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) char service_path[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) u16 transaction_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) struct qmi_elem_info servreg_state_updated_ind_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) .data_type = QMI_SIGNED_4_BYTE_ENUM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) .elem_size = sizeof(u32),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) .tlv_type = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) .offset = offsetof(struct servreg_state_updated_ind,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) curr_state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) .offset = offsetof(struct servreg_state_updated_ind,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) service_path),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) .data_type = QMI_UNSIGNED_2_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) .elem_size = sizeof(u16),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) .tlv_type = 0x03,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) .offset = offsetof(struct servreg_state_updated_ind,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) transaction_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) struct servreg_set_ack_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) char service_path[SERVREG_NAME_LENGTH + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) u16 transaction_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) struct qmi_elem_info servreg_set_ack_req_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) .data_type = QMI_STRING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) .elem_len = SERVREG_NAME_LENGTH + 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) .elem_size = sizeof(char),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) .tlv_type = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) .offset = offsetof(struct servreg_set_ack_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) service_path),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) .data_type = QMI_UNSIGNED_2_BYTE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) .elem_size = sizeof(u16),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) .offset = offsetof(struct servreg_set_ack_req,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) transaction_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) struct servreg_set_ack_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) struct qmi_response_type_v01 resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) struct qmi_elem_info servreg_set_ack_resp_ei[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) .data_type = QMI_STRUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) .elem_len = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) .elem_size = sizeof(struct qmi_response_type_v01),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) .array_type = NO_ARRAY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) .tlv_type = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) .offset = offsetof(struct servreg_set_ack_resp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) resp),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) .ei_array = qmi_response_type_v01_ei,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) #endif