From d1a0dfa4e46374ecd4d85f243264b10523ae09b3 Mon Sep 17 00:00:00 2001 From: Guru Das Srinagesh Date: Thu, 8 Sep 2022 15:59:38 -0700 Subject: [PATCH] soc: qcom: Introduce null functions Introduce null APIs for supporting compilation of client drivers. Change-Id: I553d8b8987818beaf4b3abd33198c2cbea1309f6 Signed-off-by: Prasad Sodagudi Signed-off-by: Guru Das Srinagesh --- include/linux/soc/qcom/pdr.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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