diff --git a/include/linux/soc/qcom/pdr.h b/include/linux/soc/qcom/pdr.h index 83a8ea612e69..51d70d75e668 100644 --- a/include/linux/soc/qcom/pdr.h +++ b/include/linux/soc/qcom/pdr.h @@ -1,4 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + */ #ifndef __QCOM_PDR_HELPER__ #define __QCOM_PDR_HELPER__ @@ -17,6 +20,7 @@ enum servreg_service_state { SERVREG_SERVICE_STATE_UNINIT = 0x7FFFFFFF, }; +#if IS_ENABLED(CONFIG_QCOM_PDR_HELPERS) struct pdr_handle *pdr_handle_alloc(void (*status)(int state, char *service_path, void *priv), void *priv); @@ -26,4 +30,22 @@ struct pdr_service *pdr_add_lookup(struct pdr_handle *pdr, int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds); void pdr_handle_release(struct pdr_handle *pdr); +#else +struct pdr_handle *pdr_handle_alloc(void (*status)(int state, + char *service_path, + void *priv), void *priv) +{ return NULL; } + +struct pdr_service *pdr_add_lookup(struct pdr_handle *pdr, + const char *service_name, + const char *service_path) +{ return NULL; } + +int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds) +{ return 0; } + +void pdr_handle_release(struct pdr_handle *pdr) +{ return; } + +#endif #endif