1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __QCOM_PDR_HELPER__
3 #define __QCOM_PDR_HELPER__
4 
5 #include <linux/soc/qcom/qmi.h>
6 
7 #define SERVREG_NAME_LENGTH	64
8 
9 struct pdr_service;
10 struct pdr_handle;
11 
12 enum servreg_service_state {
13 	SERVREG_LOCATOR_ERR = 0x1,
14 	SERVREG_SERVICE_STATE_DOWN = 0x0FFFFFFF,
15 	SERVREG_SERVICE_STATE_UP = 0x1FFFFFFF,
16 	SERVREG_SERVICE_STATE_EARLY_DOWN = 0x2FFFFFFF,
17 	SERVREG_SERVICE_STATE_UNINIT = 0x7FFFFFFF,
18 };
19 
20 struct pdr_handle *pdr_handle_alloc(void (*status)(int state,
21 						   char *service_path,
22 						   void *priv), void *priv);
23 struct pdr_service *pdr_add_lookup(struct pdr_handle *pdr,
24 				   const char *service_name,
25 				   const char *service_path);
26 int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds);
27 void pdr_handle_release(struct pdr_handle *pdr);
28 
29 #endif
30