Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9c2b98b authored by Anomalchik's avatar Anomalchik
Browse files

camera_v2: add option for disable IR_Led and IR_Cut driver

it's need for TAG LA.UM.5.3 and lower
parent d26dde63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2619,6 +2619,7 @@ CONFIG_OV8825=y
CONFIG_OV8865=y
CONFIG_s5k4e1=y
CONFIG_OV12830=y
CONFIG_MSMB_WITHOUT_IR=y
CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y
CONFIG_MSMB_JPEG=y
CONFIG_MSM_FD=y
+6 −0
Original line number Diff line number Diff line
@@ -212,6 +212,12 @@ config OV12830
		snapshot config = 4224 * 3000 at 15 fps.
		2 lanes max fps is 18, 4 lanes max fps is 24.

config MSMB_WITHOUT_IR
	bool "Compile camera_v2 without ir"
	depends on MSMB_CAMERA
	---help---
		Need for LA.UM.5.3 and lower

config MSM_V4L2_VIDEO_OVERLAY_DEVICE
	tristate "QTI MSM V4l2 video overlay device"
	---help---
+4 −0
Original line number Diff line number Diff line
@@ -4,5 +4,9 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2/msm_vb2
ccflags-y += -Idrivers/media/platform/msm/camera_v2/camera
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci
ifeq ($(CONFIG_MSMB_WITHOUT_IR),y)
obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ eeprom/ ois/ flash/
else
obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ eeprom/ ois/ flash/ ir_led/ ir_cut/
endif
obj-$(CONFIG_MSM_CAMERA_SENSOR) += msm_sensor_init.o msm_sensor_driver.o msm_sensor.o
+4 −0
Original line number Diff line number Diff line
@@ -285,6 +285,7 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node,
		src_node = NULL;
	}

#ifndef CONFIG_MSMB_WITHOUT_IR
	src_node = of_parse_phandle(of_node, "qcom,ir-led-src", 0);
	if (!src_node) {
		CDBG("%s:%d src_node NULL\n", __func__, __LINE__);
@@ -316,6 +317,7 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node,
		of_node_put(src_node);
		src_node = NULL;
	}
#endif

	rc = of_property_read_u32(of_node, "qcom,strobe-flash-sd-index", &val);
	if (rc != -EINVAL) {
@@ -876,6 +878,7 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node,
		return rc;
	}

#ifndef CONFIG_MSMB_WITHOUT_IR
	rc = of_property_read_u32(of_node, "qcom,gpio-ir-p", &val);
	if (rc != -EINVAL) {
		if (rc < 0) {
@@ -922,6 +925,7 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node,
	} else {
		rc = 0;
	}
#endif

	rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val);
	if (rc != -EINVAL) {
+6 −0
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
#define __LINUX_MSM_CAM_SENSOR_H

#include <uapi/media/msm_cam_sensor.h>
#ifndef CONFIG_MSMB_WITHOUT_IR
#include <uapi/media/msm_camsensor_sdk.h>
#endif

#include <linux/compat.h>

@@ -73,6 +75,7 @@ struct csid_cfg_data32 {
	} cfg;
};

#ifndef CONFIG_MSMB_WITHOUT_IR
struct msm_ir_led_cfg_data_t32 {
	enum msm_ir_led_cfg_type_t cfg_type;
	int32_t pwm_duty_on_ns;
@@ -82,6 +85,7 @@ struct msm_ir_led_cfg_data_t32 {
struct msm_ir_cut_cfg_data_t32 {
	enum msm_ir_cut_cfg_type_t cfg_type;
};
#endif

struct eeprom_read_t32 {
	compat_uptr_t dbuffer;
@@ -270,12 +274,14 @@ struct msm_flash_cfg_data_t32 {
#define VIDIOC_MSM_FLASH_CFG32 \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t32)

#ifndef CONFIG_MSMB_WITHOUT_IR
#define VIDIOC_MSM_IR_LED_CFG32 \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_ir_led_cfg_data_t32)

#define VIDIOC_MSM_IR_CUT_CFG32 \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_cut_cfg_data_t32)
#endif
#endif

#endif
Loading