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

Commit c7f3276e authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Intra Client Mask fix Dual IFE" into dev/msm-4.9-camx

parents 9e8954ae 8a2dc2d4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -66,6 +66,11 @@ First Level Node - CAM CPAS device
  Value type: <u32>
  Definition: Interrupt associated with CAMNOC HW.

- qcom,cpas-hw-ver
  Usage: required
  Value type: <u32>
  Definition: CAM HW Version information.

- regulator-names
  Usage: required
  Value type: <string>
@@ -181,6 +186,7 @@ Example:
		reg-cam-base = <0x40000 0x42000>;
		interrupt-names = "cpas_camnoc";
		interrupts = <0 459 0>;
		qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */
		regulator-names = "camss-vdd";
		camss-vdd-supply = <&titan_top_gdsc>;
		clock-names = "gcc_ahb_clk",
+1 −0
Original line number Diff line number Diff line
@@ -358,6 +358,7 @@
		reg-cam-base = <0x40000 0x42000>;
		interrupt-names = "cpas_camnoc";
		interrupts = <0 459 0>;
		qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */
		regulator-names = "camss-vdd";
		camss-vdd-supply = <&titan_top_gdsc>;
		clock-names = "gcc_ahb_clk",
+1 −0
Original line number Diff line number Diff line
@@ -256,6 +256,7 @@
		reg-cam-base = <0x40000 0x42000>;
		interrupt-names = "cpas_camnoc";
		interrupts = <0 459 0>;
		qcom,cpas-hw-ver = <0x170110>; /* Titan v170 v1.1.0 */
		regulator-names = "camss-vdd";
		camss-vdd-supply = <&titan_top_gdsc>;
		clock-names = "gcc_ahb_clk",
+25 −0
Original line number Diff line number Diff line
@@ -1302,6 +1302,27 @@ static int cam_cpas_util_get_internal_ops(struct platform_device *pdev,
	return rc;
}

static int cam_cpas_util_get_hw_version(struct platform_device *pdev,
	struct cam_hw_soc_info *soc_info)
{
	struct device_node *of_node = pdev->dev.of_node;
	int rc;

	soc_info->hw_version = 0;

	rc = of_property_read_u32(of_node,
		"qcom,cpas-hw-ver", &soc_info->hw_version);

	CAM_DBG(CAM_CPAS, "CPAS HW VERSION %x", soc_info->hw_version);

	if (rc) {
		CAM_ERR(CAM_CPAS, "failed to get CPAS HW Version rc=%d", rc);
		return -EINVAL;
	}

	return rc;
}

int cam_cpas_hw_probe(struct platform_device *pdev,
	struct cam_hw_intf **hw_intf)
{
@@ -1442,6 +1463,10 @@ int cam_cpas_hw_probe(struct platform_device *pdev,
	if (rc)
		goto axi_cleanup;

	rc = cam_cpas_util_get_hw_version(pdev, &cpas_hw->soc_info);
	if (rc)
		goto axi_cleanup;

	*hw_intf = cpas_hw_intf;
	return 0;

+27 −0
Original line number Diff line number Diff line
@@ -50,6 +50,33 @@ struct cam_cpas_intf {

static struct cam_cpas_intf *g_cpas_intf;

int cam_cpas_get_cpas_hw_version(uint32_t *hw_version)
{
	struct cam_hw_info *cpas_hw = NULL;

	if (!CAM_CPAS_INTF_INITIALIZED()) {
		CAM_ERR(CAM_CPAS, "cpas intf not initialized");
		return -ENODEV;
	}

	if (!hw_version) {
		CAM_ERR(CAM_CPAS, "invalid input %pK", hw_version);
		return -EINVAL;
	}

	cpas_hw = (struct cam_hw_info  *) g_cpas_intf->hw_intf->hw_priv;

	*hw_version = cpas_hw->soc_info.hw_version;

	if (*hw_version == CAM_CPAS_TITAN_NONE) {
		CAM_DBG(CAM_CPAS, "Didn't find a valid HW Version %d",
			*hw_version);
	}

	return 0;
}


int cam_cpas_get_hw_info(uint32_t *camera_family,
	struct cam_hw_version *camera_version,
	struct cam_hw_version *cpas_version)
Loading