diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000000..da68ae0bdd --- /dev/null +++ b/Android.mk @@ -0,0 +1,34 @@ +ifneq ($(TARGET_PRODUCT), qssi) + +ifeq ($(call is-board-platform-in-list, $(TARGET_BOARD_PLATFORM)),true) + +# Make target to specify building the camera.ko from within Android build system. +LOCAL_PATH := $(call my-dir) +# Path to DLKM make scripts +DLKM_DIR := $(TOP)/device/qcom/common/dlkm + +# Kbuild options +KBUILD_OPTIONS := CAMERA_KERNEL_ROOT=$(shell pwd)/$(LOCAL_PATH) +KBUILD_OPTIONS += KERNEL_ROOT=$(shell pwd)/kernel/msm-$(TARGET_KERNEL_VERSION)/ +KBUILD_OPTIONS += MODNAME=camera +KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) + +# Clear shell environment variables from previous android module during build +include $(CLEAR_VARS) +LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) +LOCAL_MODULE := camera.ko +LOCAL_MODULE_TAGS := optional +#LOCAL_MODULE_KBUILD_NAME := camera.ko +#LOCAL_MODULE_DEBUG_ENABLE := true + +ifeq ($(TARGET_BOARD_PLATFORM), lahaina) +# Include Kernel DLKM Android.mk target to place generated .ko file in image +include $(DLKM_DIR)/AndroidKernelModule.mk +# Include Camera UAPI Android.mk target to copy headers +include $(LOCAL_PATH)/include/uapi/Android.mk +else +include $(DLKM_DIR)/Build_external_kernelmodule.mk +endif + +endif # End of check for board platform +endif # End of check for target product \ No newline at end of file diff --git a/Kbuild b/Kbuild new file mode 100644 index 0000000000..ccbfd20508 --- /dev/null +++ b/Kbuild @@ -0,0 +1,260 @@ +# SPDX-License-Identifier: GPL-2.0-only + +ifeq ($(CONFIG_QCOM_CAMERA_DEBUG), y) +$(info "CAMERA_KERNEL_ROOT is: $(CAMERA_KERNEL_ROOT)") +$(info "KERNEL_ROOT is: $(KERNEL_ROOT)") +endif + +# Include Architecture configurations +ifeq ($(CONFIG_ARCH_WAIPIO), y) +include $(CAMERA_KERNEL_ROOT)/config/waipio.mk +endif + +ifeq ($(CONFIG_ARCH_LAHAINA), y) +include $(CAMERA_KERNEL_ROOT)/config/lahaina.mk +endif + +ifeq ($(CONFIG_ARCH_KONA), y) +include $(CAMERA_KERNEL_ROOT)/config/kona.mk +endif + +ifeq ($(CONFIG_ARCH_BENGAL), y) +include $(CAMERA_KERNEL_ROOT)/config/holi.mk +endif + +ifeq ($(CONFIG_ARCH_HOLI), y) +include $(CAMERA_KERNEL_ROOT)/config/holi.mk +endif + +ifeq ($(CONFIG_ARCH_LITO), y) +include $(CAMERA_KERNEL_ROOT)/config/lito.mk +endif + +ifeq ($(CONFIG_ARCH_SHIMA), y) +include $(CAMERA_KERNEL_ROOT)/config/shima.mk +endif + +# List of all camera-kernel headers +cam_include_dirs := $(shell dirname `find $(CAMERA_KERNEL_ROOT) -name '*.h'` | uniq) + +# Include UAPI headers +USERINCLUDE += \ + -I$(CAMERA_KERNEL_ROOT)/include/uapi/ +# Include Kernel headers +LINUXINCLUDE += \ + -I$(KERNEL_ROOT) \ + $(addprefix -I,$(cam_include_dirs)) \ + -I$(CAMERA_KERNEL_ROOT)/include/uapi/camera + +# Optional include directories +ccflags-$(CONFIG_MSM_GLOBAL_SYNX) += -I$(KERNEL_ROOT)/drivers/media/platform/msm/synx + +# After creating lists, add content of 'ccflags-m' variable to 'ccflags-y' one. +ccflags-y += ${ccflags-m} + +camera-y := \ + drivers/cam_req_mgr/cam_req_mgr_core.o \ + drivers/cam_req_mgr/cam_req_mgr_dev.o \ + drivers/cam_req_mgr/cam_req_mgr_util.o \ + drivers/cam_req_mgr/cam_mem_mgr.o \ + drivers/cam_req_mgr/cam_req_mgr_workq.o \ + drivers/cam_req_mgr/cam_req_mgr_timer.o \ + drivers/cam_req_mgr/cam_req_mgr_debug.o \ + drivers/cam_utils/cam_soc_util.o \ + drivers/cam_utils/cam_io_util.o \ + drivers/cam_utils/cam_packet_util.o \ + drivers/cam_utils/cam_debug_util.o \ + drivers/cam_utils/cam_trace.o \ + drivers/cam_utils/cam_common_util.o \ + drivers/cam_utils/cam_compat.o \ + drivers/cam_core/cam_context.o \ + drivers/cam_core/cam_context_utils.o \ + drivers/cam_core/cam_node.o \ + drivers/cam_core/cam_subdev.o \ + drivers/cam_smmu/cam_smmu_api.o \ + drivers/cam_sync/cam_sync.o \ + drivers/cam_sync/cam_sync_util.o \ + drivers/cam_cpas/cpas_top/cam_cpastop_hw.o \ + drivers/cam_cpas/camss_top/cam_camsstop_hw.o \ + drivers/cam_cpas/cam_cpas_soc.o \ + drivers/cam_cpas/cam_cpas_intf.o \ + drivers/cam_cpas/cam_cpas_hw.o \ + drivers/cam_cdm/cam_cdm_soc.o \ + drivers/cam_cdm/cam_cdm_util.o \ + drivers/cam_cdm/cam_cdm_intf.o \ + drivers/cam_cdm/cam_cdm_core_common.o \ + drivers/cam_cdm/cam_cdm_virtual_core.o \ + drivers/cam_cdm/cam_cdm_hw_core.o + +camera-$(CONFIG_QCOM_CX_IPEAK) += drivers/cam_utils/cam_cx_ipeak.o +camera-$(CONFIG_QCOM_BUS_SCALING) += drivers/cam_utils/cam_soc_bus.o +camera-$(CONFIG_INTERCONNECT_QCOM) += drivers/cam_utils/cam_soc_icc.o + +camera-$(CONFIG_SPECTRA_ISP) += \ + drivers/cam_isp/isp_hw_mgr/hw_utils/cam_tasklet_util.o \ + drivers/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.o \ + drivers/cam_isp/isp_hw_mgr/hw_utils/irq_controller/cam_irq_controller.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_mod.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite_mod.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_rd_ver1.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_lite_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_common.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver3.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver3.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_rdi.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_lite_ver3.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver1.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver2.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver3.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg.o \ + drivers/cam_isp/isp_hw_mgr/cam_isp_hw_mgr.o \ + drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.o \ + drivers/cam_isp/cam_isp_dev.o \ + drivers/cam_isp/cam_isp_context.o + +camera-$(CONFIG_SPECTRA_SFE) += \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_rd.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.o \ + +camera-$(CONFIG_SPECTRA_ICP) += \ + drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.o \ + drivers/cam_icp/icp_hw/ipe_hw/ipe_dev.o \ + drivers/cam_icp/icp_hw/ipe_hw/ipe_core.o \ + drivers/cam_icp/icp_hw/ipe_hw/ipe_soc.o \ + drivers/cam_icp/icp_hw/a5_hw/a5_dev.o \ + drivers/cam_icp/icp_hw/a5_hw/a5_core.o \ + drivers/cam_icp/icp_hw/a5_hw/a5_soc.o \ + drivers/cam_icp/icp_hw/bps_hw/bps_dev.o \ + drivers/cam_icp/icp_hw/bps_hw/bps_core.o \ + drivers/cam_icp/icp_hw/bps_hw/bps_soc.o \ + drivers/cam_icp/cam_icp_subdev.o \ + drivers/cam_icp/cam_icp_context.o \ + drivers/cam_icp/hfi.o + +camera-$(CONFIG_SPECTRA_JPEG) += \ + drivers/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.o \ + drivers/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_core.o \ + drivers/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_soc.o \ + drivers/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.o \ + drivers/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_core.o \ + drivers/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_soc.o \ + drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.o \ + drivers/cam_jpeg/cam_jpeg_dev.o \ + drivers/cam_jpeg/cam_jpeg_context.o + +camera-$(CONFIG_SPECTRA_FD) += \ + drivers/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.o \ + drivers/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_core.o \ + drivers/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_soc.o \ + drivers/cam_fd/fd_hw_mgr/cam_fd_hw_mgr.o \ + drivers/cam_fd/cam_fd_dev.o \ + drivers/cam_fd/cam_fd_context.o + +camera-$(CONFIG_SPECTRA_LRME) += \ + drivers/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.o \ + drivers/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_core.o \ + drivers/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_soc.o \ + drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.o \ + drivers/cam_lrme/cam_lrme_dev.o \ + drivers/cam_lrme/cam_lrme_context.o + +camera-$(CONFIG_SPECTRA_SENSOR) += \ + drivers/cam_sensor_module/cam_actuator/cam_actuator_dev.o \ + drivers/cam_sensor_module/cam_actuator/cam_actuator_core.o \ + drivers/cam_sensor_module/cam_actuator/cam_actuator_soc.o \ + drivers/cam_sensor_module/cam_cci/cam_cci_dev.o \ + drivers/cam_sensor_module/cam_cci/cam_cci_core.o \ + drivers/cam_sensor_module/cam_cci/cam_cci_soc.o \ + drivers/cam_sensor_module/cam_csiphy/cam_csiphy_soc.o \ + drivers/cam_sensor_module/cam_csiphy/cam_csiphy_dev.o \ + drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.o \ + drivers/cam_sensor_module/cam_eeprom/cam_eeprom_dev.o \ + drivers/cam_sensor_module/cam_eeprom/cam_eeprom_core.o \ + drivers/cam_sensor_module/cam_eeprom/cam_eeprom_soc.o \ + drivers/cam_sensor_module/cam_ois/cam_ois_dev.o \ + drivers/cam_sensor_module/cam_ois/cam_ois_core.o \ + drivers/cam_sensor_module/cam_ois/cam_ois_soc.o \ + drivers/cam_sensor_module/cam_sensor/cam_sensor_dev.o \ + drivers/cam_sensor_module/cam_sensor/cam_sensor_core.o \ + drivers/cam_sensor_module/cam_sensor/cam_sensor_soc.o \ + drivers/cam_sensor_module/cam_sensor_io/cam_sensor_io.o \ + drivers/cam_sensor_module/cam_sensor_io/cam_sensor_cci_i2c.o \ + drivers/cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.o \ + drivers/cam_sensor_module/cam_sensor_io/cam_sensor_spi.o \ + drivers/cam_sensor_module/cam_sensor_utils/cam_sensor_util.o \ + drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.o + +camera-$(CONFIG_LEDS_QPNP_FLASH_V2) += \ + drivers/cam_sensor_module/cam_flash/cam_flash_dev.o \ + drivers/cam_sensor_module/cam_flash/cam_flash_core.o \ + drivers/cam_sensor_module/cam_flash/cam_flash_soc.o + +camera-$(CONFIG_LEDS_QTI_FLASH) += \ + drivers/cam_sensor_module/cam_flash/cam_flash_dev.o \ + drivers/cam_sensor_module/cam_flash/cam_flash_core.o \ + drivers/cam_sensor_module/cam_flash/cam_flash_soc.o + +camera-$(CONFIG_SPECTRA_CUSTOM) += \ + drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_soc.o \ + drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_dev.o \ + drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_core.o \ + drivers/cam_cust/cam_custom_hw_mgr/cam_custom_csid/cam_custom_csid_dev.o \ + drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw_mgr.o \ + drivers/cam_cust/cam_custom_dev.o \ + drivers/cam_cust/cam_custom_context.o + +camera-$(CONFIG_SPECTRA_OPE) += \ + drivers/cam_ope/cam_ope_subdev.o \ + drivers/cam_ope/cam_ope_context.o \ + drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.o \ + drivers/cam_ope/ope_hw_mgr/ope_hw/ope_dev.o \ + drivers/cam_ope/ope_hw_mgr/ope_hw/ope_soc.o \ + drivers/cam_ope/ope_hw_mgr/ope_hw/ope_core.o \ + drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.o \ + drivers/cam_ope/ope_hw_mgr/ope_hw/bus_rd/ope_bus_rd.o\ + drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.o + +camera-$(CONFIG_SPECTRA_TFE) += \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi100.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_dev.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_soc.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.o \ + drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid530.o \ + drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.o + +camera-y += drivers/camera_main.o + +obj-m += camera.o +BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/camera.ko diff --git a/Makefile b/Makefile index 44714b7440..b9a7b4f0ba 100644 --- a/Makefile +++ b/Makefile @@ -1,83 +1,14 @@ -# SPDX-License-Identifier: GPL-2.0-only +# Makefile for use with Android's kernel/build system -# auto-detect subdirs -ifneq ($(CONFIG_ARCH_QTI_VM), y) -ifeq ($(CONFIG_ARCH_KONA), y) -include $(srctree)/techpack/camera/config/konacamera.conf -endif +KBUILD_OPTIONS += CAMERA_KERNEL_ROOT=$(shell pwd) +KBUILD_OPTIONS += KERNEL_ROOT=$(ROOT_DIR)/$(KERNEL_DIR) +KBUILD_OPTIONS += MODNAME=camera -ifeq ($(CONFIG_ARCH_LITO), y) -include $(srctree)/techpack/camera/config/litocamera.conf -endif +modules: + $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) -ifeq ($(CONFIG_ARCH_BENGAL), y) -include $(srctree)/techpack/camera/config/bengalcamera.conf -endif +modules_install: + $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install -ifeq ($(CONFIG_ARCH_LAHAINA), y) -include $(srctree)/techpack/camera/config/lahainacamera.conf -endif - -ifeq ($(CONFIG_ARCH_HOLI), y) -include $(srctree)/techpack/camera/config/holicamera.conf -endif - -ifeq ($(CONFIG_ARCH_SHIMA), y) -include $(srctree)/techpack/camera/config/shimacamera.conf -endif - -ifeq ($(CONFIG_ARCH_YUPIK), y) -include $(srctree)/techpack/camera/config/yupikcamera.conf -endif - -ifeq ($(CONFIG_ARCH_KONA), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/konacameraconf.h -endif - -ifeq ($(CONFIG_ARCH_LITO), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/litocameraconf.h -endif - -ifeq ($(CONFIG_ARCH_BENGAL), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/bengalcameraconf.h -endif - -ifeq ($(CONFIG_ARCH_LAHAINA), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/lahainacameraconf.h -endif - -ifeq ($(CONFIG_ARCH_HOLI), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/holicameraconf.h -endif - -ifeq ($(CONFIG_ARCH_SHIMA), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/shimacameraconf.h -endif - -ifeq ($(CONFIG_ARCH_YUPIK), y) -LINUXINCLUDE += \ - -include $(srctree)/techpack/camera/config/yupikcameraconf.h -endif - -endif - -ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m)) -# Use USERINCLUDE when you must reference the UAPI directories only. -USERINCLUDE += \ - -I$(srctree)/techpack/camera/include/uapi - -# Use LINUXINCLUDE when you must reference the include/ directory. -# Needed to be compatible with the O= option -LINUXINCLUDE += \ - -I$(srctree)/techpack/camera/include/uapi \ - -I$(srctree)/techpack/camera/include -obj-y += drivers/ -else -$(info Target not found) -endif +clean: + $(MAKE) -C $(KERNEL_SRC) M=$(M) clean diff --git a/board.mk b/board.mk new file mode 100644 index 0000000000..715f1d580b --- /dev/null +++ b/board.mk @@ -0,0 +1,6 @@ +# Build camera kernel driver +ifneq ($(TARGET_BOARD_AUTO),true) +ifeq ($(call is-board-platform-in-list,$(TARGET_BOARD_PLATFORM)),true) +BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/camera.ko +endif +endif \ No newline at end of file diff --git a/config/bengalcamera.conf b/config/bengalcamera.conf deleted file mode 100644 index 38e163af7e..0000000000 --- a/config/bengalcamera.conf +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2019, The Linux Foundation. All rights reserved. - -export CONFIG_SPECTRA_CAMERA=y -export CONFIG_SPECTRA_TFE=y -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_OPE=y diff --git a/config/bengalcameraconf.h b/config/bengalcameraconf.h deleted file mode 100644 index bb1f8be401..0000000000 --- a/config/bengalcameraconf.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. - */ - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_TFE 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_OPE 1 - diff --git a/config/holi.mk b/config/holi.mk new file mode 100644 index 0000000000..0ffdaaca46 --- /dev/null +++ b/config/holi.mk @@ -0,0 +1,13 @@ +# Settings for compiling holi camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_OPE := y +CONFIG_SPECTRA_TFE := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_OPE=1 +ccflags-y += -DCONFIG_SPECTRA_TFE=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/holicamera.conf b/config/holicamera.conf deleted file mode 100644 index 85bc1dae00..0000000000 --- a/config/holicamera.conf +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2020, The Linux Foundation. All rights reserved. - -$(info "HOLI SPECTRA_CAMERA IS MODULAR") -export CONFIG_SPECTRA_CAMERA=m - -ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m)) -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_OPE=y -export CONFIG_SPECTRA_TFE=y -export CONFIG_SPECTRA_SENSOR=y -endif diff --git a/config/holicameraconf.h b/config/holicameraconf.h deleted file mode 100644 index 958fe154c1..0000000000 --- a/config/holicameraconf.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. - */ - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_OPE 1 -#define CONFIG_SPECTRA_TFE 1 -#define CONFIG_SPECTRA_SENSOR 1 diff --git a/config/kona.mk b/config/kona.mk new file mode 100644 index 0000000000..94ee92a9b6 --- /dev/null +++ b/config/kona.mk @@ -0,0 +1,15 @@ +# Settings for compiling kona camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_FD := y +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_FD=1 +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/konacamera.conf b/config/konacamera.conf deleted file mode 100644 index 9d3834b986..0000000000 --- a/config/konacamera.conf +++ /dev/null @@ -1,6 +0,0 @@ -export CONFIG_SPECTRA_CAMERA=y -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y -export CONFIG_SPECTRA_FD=y diff --git a/config/konacameraconf.h b/config/konacameraconf.h deleted file mode 100644 index 971c8383e5..0000000000 --- a/config/konacameraconf.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2019, The Linux Foundation. All rights reserved. - */ - - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 -#define CONFIG_SPECTRA_FD 1 - diff --git a/config/lahaina.mk b/config/lahaina.mk new file mode 100644 index 0000000000..2962ea0fc3 --- /dev/null +++ b/config/lahaina.mk @@ -0,0 +1,15 @@ +# Settings for compiling lahaina camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_CUSTOM := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_CUSTOM=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/lahainacamera.conf b/config/lahainacamera.conf deleted file mode 100644 index 3e3d0744ca..0000000000 --- a/config/lahainacamera.conf +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. - -ifeq ($(CONFIG_QGKI),y) -export CONFIG_SPECTRA_CAMERA=m -$(info "QGKI Spectra Camera Building as DLKM") -else -export CONFIG_SPECTRA_CAMERA=m -$(info "GKI Spectra Camera Building as DLKM") -endif - -ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m)) -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y -export CONFIG_SPECTRA_CUSTOM=y -endif diff --git a/config/lahainacameraconf.h b/config/lahainacameraconf.h deleted file mode 100644 index a780c96bfd..0000000000 --- a/config/lahainacameraconf.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. - */ - - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 -#define CONFIG_SPECTRA_CUSTOM 1 diff --git a/config/lito.mk b/config/lito.mk new file mode 100644 index 0000000000..6ea1131258 --- /dev/null +++ b/config/lito.mk @@ -0,0 +1,17 @@ +# Settings for compiling lito camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_FD := y +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_LRME := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_FD=1 +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_LRME=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/litocamera.conf b/config/litocamera.conf deleted file mode 100644 index 051268ee0f..0000000000 --- a/config/litocamera.conf +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2019, The Linux Foundation. All rights reserved. - -export CONFIG_SPECTRA_CAMERA=y -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y -export CONFIG_SPECTRA_LRME=y -export CONFIG_SPECTRA_FD=y diff --git a/config/litocameraconf.h b/config/litocameraconf.h deleted file mode 100644 index 08b473441f..0000000000 --- a/config/litocameraconf.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2019, The Linux Foundation. All rights reserved. - */ - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 -#define CONFIG_SPECTRA_LRME 1 -#define CONFIG_SPECTRA_FD 1 diff --git a/config/shima.mk b/config/shima.mk new file mode 100644 index 0000000000..c86bb31341 --- /dev/null +++ b/config/shima.mk @@ -0,0 +1,13 @@ +# Settings for compiling shima camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/shimacamera.conf b/config/shimacamera.conf deleted file mode 100644 index ddc74389ec..0000000000 --- a/config/shimacamera.conf +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2020, The Linux Foundation. All rights reserved. - -ifeq ($(CONFIG_QGKI),y) -export CONFIG_SPECTRA_CAMERA=m -$(info "SPECTRA_CAMERA IS MODULAR") -else -$(info "SPECTRA_CAMERA IS MODULAR") -export CONFIG_SPECTRA_CAMERA=m -endif - -ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m)) -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y -endif diff --git a/config/shimacameraconf.h b/config/shimacameraconf.h deleted file mode 100644 index f759885678..0000000000 --- a/config/shimacameraconf.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. - */ - - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 diff --git a/config/waipio.mk b/config/waipio.mk new file mode 100644 index 0000000000..923dbaa591 --- /dev/null +++ b/config/waipio.mk @@ -0,0 +1,17 @@ +# Settings for compiling waipio camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_SFE := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_CUSTOM := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_SFE=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_CUSTOM=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/waipiocamera.conf b/config/waipiocamera.conf deleted file mode 100644 index 407c5956dd..0000000000 --- a/config/waipiocamera.conf +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2020, The Linux Foundation. All rights reserved. - -export CONFIG_SPECTRA_CAMERA=m - -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SFE=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y diff --git a/config/waipiocameraconf.h b/config/waipiocameraconf.h deleted file mode 100644 index 91cfae4d85..0000000000 --- a/config/waipiocameraconf.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. - */ - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SFE 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 diff --git a/config/yupik.mk b/config/yupik.mk new file mode 100644 index 0000000000..8c08e40cfd --- /dev/null +++ b/config/yupik.mk @@ -0,0 +1,15 @@ +# Settings for compiling yupik camera architecture + +# Localized KCONFIG settings +CONFIG_SPECTRA_ISP := y +CONFIG_SPECTRA_ICP := y +CONFIG_SPECTRA_JPEG := y +CONFIG_SPECTRA_LRME := y +CONFIG_SPECTRA_SENSOR := y + +# Flags to pass into C preprocessor +ccflags-y += -DCONFIG_SPECTRA_ISP=1 +ccflags-y += -DCONFIG_SPECTRA_ICP=1 +ccflags-y += -DCONFIG_SPECTRA_JPEG=1 +ccflags-y += -DCONFIG_SPECTRA_LRME=1 +ccflags-y += -DCONFIG_SPECTRA_SENSOR=1 diff --git a/config/yupikcamera.conf b/config/yupikcamera.conf deleted file mode 100644 index 7f259936c9..0000000000 --- a/config/yupikcamera.conf +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# Copyright (c) 2020, The Linux Foundation. All rights reserved. - -ifeq ($(CONFIG_QGKI),y) -export CONFIG_SPECTRA_CAMERA=m -$(info "SPECTRA_CAMERA IS MODULAR") -else -$(info "SPECTRA_CAMERA IS MODULAR") -export CONFIG_SPECTRA_CAMERA=m -endif - -ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m)) -export CONFIG_SPECTRA_ISP=y -export CONFIG_SPECTRA_SENSOR=y -export CONFIG_SPECTRA_ICP=y -export CONFIG_SPECTRA_JPEG=y -export CONFIG_SPECTRA_LRME=y -endif diff --git a/config/yupikcameraconf.h b/config/yupikcameraconf.h deleted file mode 100644 index e40f43edaa..0000000000 --- a/config/yupikcameraconf.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. - */ - -#define CONFIG_SPECTRA_CAMERA 1 -#define CONFIG_SPECTRA_ISP 1 -#define CONFIG_SPECTRA_SENSOR 1 -#define CONFIG_SPECTRA_ICP 1 -#define CONFIG_SPECTRA_JPEG 1 -#define CONFIG_SPECTRA_LRME 1 diff --git a/drivers/Makefile b/drivers/Makefile deleted file mode 100644 index 5d39b0a421..0000000000 --- a/drivers/Makefile +++ /dev/null @@ -1,232 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -cameratree := $(srctree)/techpack/camera/drivers - -cam_include_dirs := $(shell dirname `find $(cameratree) -name '*.h'` | uniq) -ccflags-y += $(addprefix -I,$(cam_include_dirs)) - -ifneq (,$(filter $(CONFIG_MSM_GLOBAL_SYNX), y m)) -ccflags-y += -I$(srctree)/drivers/media/platform/msm/synx -endif - -ccflags-y += -I$(srctree)/techpack/camera/include/uapi/camera -ccflags-y += -I$(srctree) - -camera-y := \ - cam_req_mgr/cam_req_mgr_core.o \ - cam_req_mgr/cam_req_mgr_dev.o \ - cam_req_mgr/cam_req_mgr_util.o \ - cam_req_mgr/cam_mem_mgr.o \ - cam_req_mgr/cam_req_mgr_workq.o \ - cam_req_mgr/cam_req_mgr_timer.o \ - cam_req_mgr/cam_req_mgr_debug.o \ - cam_utils/cam_soc_util.o \ - cam_utils/cam_io_util.o \ - cam_utils/cam_packet_util.o \ - cam_utils/cam_debug_util.o \ - cam_utils/cam_trace.o \ - cam_utils/cam_common_util.o \ - cam_utils/cam_compat.o \ - cam_core/cam_context.o \ - cam_core/cam_context_utils.o \ - cam_core/cam_node.o \ - cam_core/cam_subdev.o \ - cam_smmu/cam_smmu_api.o \ - cam_sync/cam_sync.o \ - cam_sync/cam_sync_util.o \ - cam_cpas/cpas_top/cam_cpastop_hw.o \ - cam_cpas/camss_top/cam_camsstop_hw.o \ - cam_cpas/cam_cpas_soc.o \ - cam_cpas/cam_cpas_intf.o \ - cam_cpas/cam_cpas_hw.o \ - cam_cdm/cam_cdm_soc.o \ - cam_cdm/cam_cdm_util.o \ - cam_cdm/cam_cdm_intf.o \ - cam_cdm/cam_cdm_core_common.o \ - cam_cdm/cam_cdm_virtual_core.o \ - cam_cdm/cam_cdm_hw_core.o - -ifneq (,$(filter $(CONFIG_QCOM_CX_IPEAK),y m)) -camera-y += cam_utils/cam_cx_ipeak.o -endif - -ifneq (,$(filter $(CONFIG_QCOM_BUS_SCALING),y m)) -camera-y += cam_utils/cam_soc_bus.o -endif - -ifneq (,$(filter $(CONFIG_INTERCONNECT_QCOM),y m)) -camera-y += cam_utils/cam_soc_icc.o -endif - -camera-$(CONFIG_SPECTRA_ISP) += \ - cam_isp/isp_hw_mgr/hw_utils/cam_tasklet_util.o \ - cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.o \ - cam_isp/isp_hw_mgr/hw_utils/irq_controller/cam_irq_controller.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_mod.o \ - cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite_mod.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_rd_ver1.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_lite_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_common.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver3.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver3.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_rdi.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_lite_ver3.o \ - cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_core.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_rd.o \ - cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_core.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver1.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver2.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver3.o \ - cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg.o \ - cam_isp/isp_hw_mgr/cam_isp_hw_mgr.o \ - cam_isp/isp_hw_mgr/cam_ife_hw_mgr.o \ - cam_isp/cam_isp_dev.o \ - cam_isp/cam_isp_context.o - -camera-$(CONFIG_SPECTRA_ICP) += \ - cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.o \ - cam_icp/icp_hw/ipe_hw/ipe_dev.o \ - cam_icp/icp_hw/ipe_hw/ipe_core.o \ - cam_icp/icp_hw/ipe_hw/ipe_soc.o \ - cam_icp/icp_hw/a5_hw/a5_dev.o \ - cam_icp/icp_hw/a5_hw/a5_core.o \ - cam_icp/icp_hw/a5_hw/a5_soc.o \ - cam_icp/icp_hw/bps_hw/bps_dev.o \ - cam_icp/icp_hw/bps_hw/bps_core.o \ - cam_icp/icp_hw/bps_hw/bps_soc.o \ - cam_icp/cam_icp_subdev.o \ - cam_icp/cam_icp_context.o \ - cam_icp/hfi.o - -camera-$(CONFIG_SPECTRA_JPEG) += \ - cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.o \ - cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_core.o \ - cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_soc.o \ - cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.o \ - cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_core.o \ - cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_soc.o \ - cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.o \ - cam_jpeg/cam_jpeg_dev.o \ - cam_jpeg/cam_jpeg_context.o - -camera-$(CONFIG_SPECTRA_FD) += \ - cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.o \ - cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_core.o \ - cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_soc.o \ - cam_fd/fd_hw_mgr/cam_fd_hw_mgr.o \ - cam_fd/cam_fd_dev.o \ - cam_fd/cam_fd_context.o - -camera-$(CONFIG_SPECTRA_LRME) += \ - cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.o \ - cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_core.o \ - cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_soc.o \ - cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.o \ - cam_lrme/cam_lrme_dev.o \ - cam_lrme/cam_lrme_context.o - -camera-$(CONFIG_SPECTRA_SENSOR) += \ - cam_sensor_module/cam_actuator/cam_actuator_dev.o \ - cam_sensor_module/cam_actuator/cam_actuator_core.o \ - cam_sensor_module/cam_actuator/cam_actuator_soc.o \ - cam_sensor_module/cam_cci/cam_cci_dev.o \ - cam_sensor_module/cam_cci/cam_cci_core.o \ - cam_sensor_module/cam_cci/cam_cci_soc.o \ - cam_sensor_module/cam_csiphy/cam_csiphy_soc.o \ - cam_sensor_module/cam_csiphy/cam_csiphy_dev.o \ - cam_sensor_module/cam_csiphy/cam_csiphy_core.o \ - cam_sensor_module/cam_eeprom/cam_eeprom_dev.o \ - cam_sensor_module/cam_eeprom/cam_eeprom_core.o \ - cam_sensor_module/cam_eeprom/cam_eeprom_soc.o \ - cam_sensor_module/cam_ois/cam_ois_dev.o \ - cam_sensor_module/cam_ois/cam_ois_core.o \ - cam_sensor_module/cam_ois/cam_ois_soc.o \ - cam_sensor_module/cam_sensor/cam_sensor_dev.o \ - cam_sensor_module/cam_sensor/cam_sensor_core.o \ - cam_sensor_module/cam_sensor/cam_sensor_soc.o \ - cam_sensor_module/cam_sensor_io/cam_sensor_io.o \ - cam_sensor_module/cam_sensor_io/cam_sensor_cci_i2c.o \ - cam_sensor_module/cam_sensor_io/cam_sensor_qup_i2c.o \ - cam_sensor_module/cam_sensor_io/cam_sensor_spi.o \ - cam_sensor_module/cam_sensor_utils/cam_sensor_util.o \ - cam_sensor_module/cam_res_mgr/cam_res_mgr.o - -camera-$(CONFIG_LEDS_QPNP_FLASH_V2) += \ - cam_sensor_module/cam_flash/cam_flash_dev.o \ - cam_sensor_module/cam_flash/cam_flash_core.o \ - cam_sensor_module/cam_flash/cam_flash_soc.o - -ifneq (,$(filter $(CONFIG_LEDS_QTI_FLASH),y m)) -camera-y += \ - cam_sensor_module/cam_flash/cam_flash_dev.o \ - cam_sensor_module/cam_flash/cam_flash_core.o \ - cam_sensor_module/cam_flash/cam_flash_soc.o -endif - -camera-$(CONFIG_SPECTRA_CUSTOM) += \ - cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_soc.o \ - cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_dev.o \ - cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_core.o \ - cam_cust/cam_custom_hw_mgr/cam_custom_csid/cam_custom_csid_dev.o \ - cam_cust/cam_custom_hw_mgr/cam_custom_hw_mgr.o \ - cam_cust/cam_custom_dev.o \ - cam_cust/cam_custom_context.o - -camera-$(CONFIG_SPECTRA_OPE) += \ - cam_ope/cam_ope_subdev.o \ - cam_ope/cam_ope_context.o \ - cam_ope/ope_hw_mgr/cam_ope_hw_mgr.o \ - cam_ope/ope_hw_mgr/ope_hw/ope_dev.o \ - cam_ope/ope_hw_mgr/ope_hw/ope_soc.o \ - cam_ope/ope_hw_mgr/ope_hw/ope_core.o \ - cam_ope/ope_hw_mgr/ope_hw/top/ope_top.o \ - cam_ope/ope_hw_mgr/ope_hw/bus_rd/ope_bus_rd.o\ - cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.o - -camera-$(CONFIG_SPECTRA_TFE) += \ - cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi_core.o \ - cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/ppi_hw/cam_csid_ppi100.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_core.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_dev.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_soc.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.o \ - cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid530.o \ - cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.o - -camera-y += camera_main.o - -obj-$(CONFIG_SPECTRA_CAMERA) += camera.o - -ifeq ($(CONFIG_SPECTRA_CAMERA),m) -$(info "SPECTRA CAMERA IS BUILT AS DLKM") -BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/camera.ko -endif diff --git a/drivers/cam_utils/cam_trace.h b/drivers/cam_utils/cam_trace.h index b27b861ffd..6a17cdc7fc 100644 --- a/drivers/cam_utils/cam_trace.h +++ b/drivers/cam_utils/cam_trace.h @@ -11,7 +11,7 @@ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #undef TRACE_INCLUDE_FILE -#define TRACE_INCLUDE_FILE ../../techpack/camera/drivers/cam_utils/cam_trace +#define TRACE_INCLUDE_FILE ./cam_trace #include #include diff --git a/include/uapi/Android.mk b/include/uapi/Android.mk new file mode 100644 index 0000000000..a39ec26419 --- /dev/null +++ b/include/uapi/Android.mk @@ -0,0 +1,10 @@ +# Standalone camera UAPI header android target +LOCAL_PATH := $(call my-dir) +# Path variable for other modules to include for compilation +LOCAL_EXPORT_CAMERA_UAPI_INCLUDE := $(LOCAL_PATH)/camera/ + +CAMERA_HEADERS := $(call all-subdir-named-files,*.h) +KERNEL_SCRIPTS := $(shell pwd)/kernel/msm-$(TARGET_KERNEL_VERSION)/scripts + +include $(CLEAR_VARS) +LOCAL_MODULE := camera-uapi diff --git a/include/uapi/Kbuild b/include/uapi/Kbuild deleted file mode 100644 index d2a2f1fc30..0000000000 --- a/include/uapi/Kbuild +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note - -# Legacy file used for kernel 4.19.x build system to install -# UAPI headers. - -header-y += camera/media/cam_cpas.h -header-y += camera/media/cam_custom.h -header-y += camera/media/cam_defs.h -header-y += camera/media/cam_fd.h -header-y += camera/media/cam_icp.h -header-y += camera/media/cam_isp_ife.h -header-y += camera/media/cam_isp_vfe.h -header-y += camera/media/cam_isp.h -header-y += camera/media/cam_jpeg.h -header-y += camera/media/cam_lrme.h -header-y += camera/media/cam_req_mgr.h -header-y += camera/media/cam_sensor.h -header-y += camera/media/cam_sync.h -header-y += camera/media/cam_ope.h -header-y += camera/media/cam_isp_tfe.h -header-y += camera/media/cam_tfe.h -header-y += camera/media/cam_isp_sfe.h diff --git a/include/uapi/camera/media/cam_cpas.h b/include/uapi/camera/media/cam_cpas.h index 733770ffa4..1464beb2bf 100644 --- a/include/uapi/camera/media/cam_cpas.h +++ b/include/uapi/camera/media/cam_cpas.h @@ -6,7 +6,7 @@ #ifndef __UAPI_CAM_CPAS_H__ #define __UAPI_CAM_CPAS_H__ -#include +#include #define CAM_FAMILY_CAMERA_SS 1 #define CAM_FAMILY_CPAS_SS 2 diff --git a/include/uapi/camera/media/cam_custom.h b/include/uapi/camera/media/cam_custom.h index 87ca427421..68acd76d97 100644 --- a/include/uapi/camera/media/cam_custom.h +++ b/include/uapi/camera/media/cam_custom.h @@ -6,7 +6,7 @@ #ifndef __UAPI_CAM_CUSTOM_H__ #define __UAPI_CAM_CUSTOM_H__ -#include +#include /* Custom driver name */ #define CAM_CUSTOM_DEV_NAME "cam-custom" diff --git a/include/uapi/camera/media/cam_fd.h b/include/uapi/camera/media/cam_fd.h index da24ec78ef..9140b17366 100644 --- a/include/uapi/camera/media/cam_fd.h +++ b/include/uapi/camera/media/cam_fd.h @@ -6,7 +6,7 @@ #ifndef __UAPI_CAM_FD_H__ #define __UAPI_CAM_FD_H__ -#include +#include #define CAM_FD_MAX_FACES 35 #define CAM_FD_RAW_RESULT_ENTRIES 512 diff --git a/include/uapi/camera/media/cam_icp.h b/include/uapi/camera/media/cam_icp.h index 1139ee4736..dc9ed28d5e 100644 --- a/include/uapi/camera/media/cam_icp.h +++ b/include/uapi/camera/media/cam_icp.h @@ -6,8 +6,8 @@ #ifndef __UAPI_CAM_ICP_H__ #define __UAPI_CAM_ICP_H__ -#include -#include +#include +#include /* icp, ipe, bps, cdm(ipe/bps) are used in querycap */ #define CAM_ICP_DEV_TYPE_A5 1 diff --git a/include/uapi/camera/media/cam_isp.h b/include/uapi/camera/media/cam_isp.h index 1c23c0f59d..9faebc82ea 100644 --- a/include/uapi/camera/media/cam_isp.h +++ b/include/uapi/camera/media/cam_isp.h @@ -6,11 +6,11 @@ #ifndef __UAPI_CAM_ISP_H__ #define __UAPI_CAM_ISP_H__ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* ISP driver name */ #define CAM_ISP_DEV_NAME "cam-isp" diff --git a/include/uapi/camera/media/cam_jpeg.h b/include/uapi/camera/media/cam_jpeg.h index a1e63a3e2b..35a260cd0f 100644 --- a/include/uapi/camera/media/cam_jpeg.h +++ b/include/uapi/camera/media/cam_jpeg.h @@ -6,7 +6,7 @@ #ifndef __UAPI_CAM_JPEG_H__ #define __UAPI_CAM_JPEG_H__ -#include +#include /* enc, dma, cdm(enc/dma) are used in querycap */ #define CAM_JPEG_DEV_TYPE_ENC 0 diff --git a/include/uapi/camera/media/cam_lrme.h b/include/uapi/camera/media/cam_lrme.h index 0ee5225f2f..0cd430218f 100644 --- a/include/uapi/camera/media/cam_lrme.h +++ b/include/uapi/camera/media/cam_lrme.h @@ -6,7 +6,7 @@ #ifndef __UAPI_CAM_LRME_H__ #define __UAPI_CAM_LRME_H__ -#include +#include /* LRME Resource Types */ diff --git a/include/uapi/camera/media/cam_ope.h b/include/uapi/camera/media/cam_ope.h index cfd153cccd..1151375ef7 100644 --- a/include/uapi/camera/media/cam_ope.h +++ b/include/uapi/camera/media/cam_ope.h @@ -6,8 +6,8 @@ #ifndef __UAPI_OPE_H__ #define __UAPI_OPE_H__ -#include -#include +#include +#include #define OPE_DEV_NAME_SIZE 128 diff --git a/include/uapi/camera/media/cam_req_mgr.h b/include/uapi/camera/media/cam_req_mgr.h index 2ce529fdf8..66b349e245 100644 --- a/include/uapi/camera/media/cam_req_mgr.h +++ b/include/uapi/camera/media/cam_req_mgr.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #define CAM_REQ_MGR_VNODE_NAME "cam-req-mgr-devnode" diff --git a/include/uapi/camera/media/cam_sensor.h b/include/uapi/camera/media/cam_sensor.h index cff9973469..066a151ec2 100644 --- a/include/uapi/camera/media/cam_sensor.h +++ b/include/uapi/camera/media/cam_sensor.h @@ -8,7 +8,7 @@ #include #include -#include +#include #define CAM_SENSOR_PROBE_CMD (CAM_COMMON_OPCODE_MAX + 1) #define CAM_FLASH_MAX_LED_TRIGGERS 2 diff --git a/include/uapi/camera/media/cam_tfe.h b/include/uapi/camera/media/cam_tfe.h index dcb254c86e..523cff3395 100644 --- a/include/uapi/camera/media/cam_tfe.h +++ b/include/uapi/camera/media/cam_tfe.h @@ -6,9 +6,9 @@ #ifndef __UAPI_CAM_TFE_H__ #define __UAPI_CAM_TFE_H__ -#include -#include -#include +#include +#include +#include /* ISP TFE driver name */ diff --git a/product.mk b/product.mk new file mode 100644 index 0000000000..b77946bab8 --- /dev/null +++ b/product.mk @@ -0,0 +1 @@ +PRODUCT_PACKAGES += camera.ko