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

Commit 9e2d528d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Add support for reset controller framework"

parents bfbc8a0d 48c55694
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -22,6 +22,10 @@ Required properties:
  case dynamic clock scaling based on prevalent streams need lower clock rate.
  case dynamic clock scaling based on prevalent streams need lower clock rate.
- qcom,cpp-fw-payload-info: Child node for cpp node having infomration on
- qcom,cpp-fw-payload-info: Child node for cpp node having infomration on
  cpp firmware payload offsets. This is mandatory node.
  cpp firmware payload offsets. This is mandatory node.
- resets: reset specifier pair consists of phandle for the reset controller
  and reset lines used by this controller.
- reset-names: reset signal name strings sorted in the same order as the resets
  property.


Required properties of the child node:
Required properties of the child node:
- qcom,stripe-base = Base offset of stripes in cpp payload.
- qcom,stripe-base = Base offset of stripes in cpp payload.
@@ -120,6 +124,7 @@ Example:
			qcom,ref-we-mmu-pf-ptr-off = <22>;
			qcom,ref-we-mmu-pf-ptr-off = <22>;
			qcom,set-group-buffer-len = <135>;
			qcom,set-group-buffer-len = <135>;
			qcom,dup-frame-indicator-off = <70>;
			qcom,dup-frame-indicator-off = <70>;

		resets = <&clock_mmss MMSS_CAMSS_MICRO_BCR>;
		reset-names = "micro_iface_reset";
		};
		};
	};
	};
+4 −0
Original line number Original line Diff line number Diff line
@@ -623,6 +623,10 @@
			"camss_cpp_axi_clk", "camss_cpp_clk",
			"camss_cpp_axi_clk", "camss_cpp_clk",
			"micro_iface_clk", "camss_ahb_clk",
			"micro_iface_clk", "camss_ahb_clk",
			"smmu_cpp_axi_clk", "cpp_vbif_ahb_clk";
			"smmu_cpp_axi_clk", "cpp_vbif_ahb_clk";

		resets = <&clock_mmss CAMSS_MICRO_BCR>;
		reset-names = "micro_iface_reset";

		qcom,clock-rates = <0 0 0 480000000 0 0 480000000 0 0 0 0>;
		qcom,clock-rates = <0 0 0 480000000 0 0 480000000 0 0 0 0>;
		qcom,min-clock-rate = <200000000>;
		qcom,min-clock-rate = <200000000>;
		qcom,bus-master = <1>;
		qcom,bus-master = <1>;
+2 −0
Original line number Original line Diff line number Diff line
@@ -405,6 +405,8 @@
			<106 512 0 0>,
			<106 512 0 0>,
			<106 512 0 0>;
			<106 512 0 0>;
		qcom,msm-bus-vector-dyn-vote;
		qcom,msm-bus-vector-dyn-vote;
		resets = <&clock_mmss CAMSS_MICRO_BCR>;
		reset-names = "micro_iface_reset";
		qcom,cpp-fw-payload-info {
		qcom,cpp-fw-payload-info {
			qcom,stripe-base = <790>;
			qcom,stripe-base = <790>;
			qcom,plane-base = <715>;
			qcom,plane-base = <715>;
+22 −0
Original line number Original line Diff line number Diff line
@@ -542,6 +542,28 @@ int msm_camera_put_clk_info_and_rates(struct platform_device *pdev,
}
}
EXPORT_SYMBOL(msm_camera_put_clk_info_and_rates);
EXPORT_SYMBOL(msm_camera_put_clk_info_and_rates);


/* Get reset info from DT */
int msm_camera_get_reset_info(struct platform_device *pdev,
		struct reset_control **micro_iface_reset)
{
	if (!pdev || !micro_iface_reset)
		return -EINVAL;

	if (of_property_match_string(pdev->dev.of_node, "reset-names",
				"micro_iface_reset")) {
		pr_err("err: Reset property not found\n");
		return -EINVAL;
	}

	*micro_iface_reset = devm_reset_control_get
				(&pdev->dev, "micro_iface_reset");
	if (IS_ERR(*micro_iface_reset))
		return PTR_ERR(*micro_iface_reset);

	return 0;
}
EXPORT_SYMBOL(msm_camera_get_reset_info);

/* Get regulators from DT */
/* Get regulators from DT */
int msm_camera_get_regulator_info(struct platform_device *pdev,
int msm_camera_get_regulator_info(struct platform_device *pdev,
				struct msm_cam_regulator **vdd_info,
				struct msm_cam_regulator **vdd_info,
+16 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/regulator/consumer.h>
#include <linux/regulator/consumer.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/reset.h>
#include <soc/qcom/camera2.h>
#include <soc/qcom/camera2.h>


enum cam_bus_client {
enum cam_bus_client {
@@ -187,6 +188,21 @@ int msm_camera_clk_enable(struct device *dev,
long msm_camera_clk_set_rate(struct device *dev,
long msm_camera_clk_set_rate(struct device *dev,
				struct clk *clk,
				struct clk *clk,
				long clk_rate);
				long clk_rate);

/**
 * @brief      : Gets reset info
 *
 * This function extracts the reset information for a specific
 * platform device
 *
 * @param pdev   : platform device to get reset information
 * @param micro_iface_reset : Pointer to populate the reset names
 *
 * @return Status of operation. Negative in case of error. Zero otherwise.
 */

int msm_camera_get_reset_info(struct platform_device *pdev,
			struct reset_control **micro_iface_reset);
/**
/**
 * @brief      : Sets flags of a clock
 * @brief      : Sets flags of a clock
 *
 *
Loading