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

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

Merge "regulator: cpr-regulator: Add a DT property for min. quotient difference"

parents ff271f30 b0392e0c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -511,6 +511,9 @@ Optional properties:
				greater than all of the real row numbers addressed in other properties of
				the cpr-regulator device node.  This property is required if
				qcom,fuse-remap-source is specified.
- qcom,cpr-quot-min-diff:	Integer which defines the minimum target-quotient difference between
				the highest and (highest - 1) fuse corner to keep CPR enabled. If this
				property is not specified a default value of 50 is used.

Example:
	apc_vreg_corner: regulator@f9018000 {
+6 −1
Original line number Diff line number Diff line
@@ -2882,12 +2882,17 @@ static int cpr_init_cpr_efuse(struct platform_device *pdev,
		 */
		int *quot = cpr_vreg->cpr_fuse_target_quot;
		int highest_fuse_corner = cpr_vreg->num_fuse_corners;
		u32 min_diff_quot;
		bool valid_fuse = true;

		min_diff_quot = CPR_FUSE_MIN_QUOT_DIFF;
		of_property_read_u32(of_node, "qcom,cpr-quot-min-diff",
							&min_diff_quot);

		if (quot[highest_fuse_corner] > quot[highest_fuse_corner - 1]) {
			if ((quot[highest_fuse_corner]
				- quot[highest_fuse_corner - 1])
					<= CPR_FUSE_MIN_QUOT_DIFF)
					<= min_diff_quot)
				valid_fuse = false;
		} else {
			valid_fuse = false;