Explorar o código

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 <[email protected]>
Jigarkumar Zala %!s(int64=5) %!d(string=hai) anos
pai
achega
02ac7654b8
Modificáronse 2 ficheiros con 23 adicións e 0 borrados
  1. 3 0
      drivers/cam_utils/Makefile
  2. 20 0
      drivers/cam_utils/cam_cx_ipeak.h

+ 3 - 0
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

+ 20 - 0
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_ */