From 02ac7654b8eb407a5bfcc17f95042b244b0aa112 Mon Sep 17 00:00:00 2001 From: Jigarkumar Zala Date: Tue, 5 Nov 2019 12:58:01 -0800 Subject: [PATCH] msm: camera: utils: Add stub function for cx_ipeak Add mandate check in order to compile and use the cx_ipeak related functionality. Also, update header with stub function. CRs-Fixed: 2572607 Change-Id: I2e07101f88b6a47ca1733d04b3aa126fdeae176b Signed-off-by: Jigarkumar Zala --- drivers/cam_utils/Makefile | 3 +++ drivers/cam_utils/cam_cx_ipeak.h | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/drivers/cam_utils/Makefile b/drivers/cam_utils/Makefile index 931478f0676e..58be3110cbf5 100644 --- a/drivers/cam_utils/Makefile +++ b/drivers/cam_utils/Makefile @@ -5,4 +5,7 @@ ccflags-y += -I$(srctree)/techpack/camera/drivers/cam_req_mgr/ ccflags-y += -I$(srctree)/techpack/camera/drivers/cam_smmu/ obj-$(CONFIG_SPECTRA_CAMERA) += cam_soc_util.o cam_io_util.o cam_packet_util.o cam_debug_util.o cam_trace.o cam_common_util.o + +ifdef CONFIG_QCOM_CX_IPEAK obj-$(CONFIG_SPECTRA_CAMERA) += cam_cx_ipeak.o +endif diff --git a/drivers/cam_utils/cam_cx_ipeak.h b/drivers/cam_utils/cam_cx_ipeak.h index ab06952b86a8..4c88fa345088 100644 --- a/drivers/cam_utils/cam_cx_ipeak.h +++ b/drivers/cam_utils/cam_cx_ipeak.h @@ -8,10 +8,30 @@ #include "cam_soc_util.h" +#ifndef CONFIG_QCOM_CX_IPEAK +static inline int cam_cx_ipeak_register_cx_ipeak + (struct cam_hw_soc_info *soc_info) +{ + return 0; +} + +static inline int cam_cx_ipeak_update_vote_cx_ipeak + (struct cam_hw_soc_info *soc_info, int32_t apply_level) +{ + return 0; +} + +static inline int cam_cx_ipeak_unvote_cx_ipeak + (struct cam_hw_soc_info *soc_info) +{ + return 0; +} +#else int cam_cx_ipeak_register_cx_ipeak(struct cam_hw_soc_info *soc_info); int cam_cx_ipeak_update_vote_cx_ipeak(struct cam_hw_soc_info *soc_info, int32_t apply_level); int cam_cx_ipeak_unvote_cx_ipeak(struct cam_hw_soc_info *soc_info); +#endif #endif /* _CAM_CX_IPEAK_H_ */