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

Commit 34b58d7e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-fg-gen4: update default values for ki-coefficients"

parents 290e1470 d127b965
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ First Level Node - FG Gen4 device
		    property should be specified if qcom,ki-coeff-soc-dischg
		    is specified to make it fully functional. Value has no
		    unit. Allowed range is 0 to 15564 in micro units. If this
		    is not specified, the default value used will be 122.
		    is not specified, the default value used will be 367.

- qcom,ki-coeff-med-dischg
	Usage:      optional
@@ -394,7 +394,7 @@ First Level Node - FG Gen4 device
	Definition: ki coefficient value for low charge current during
		    charging. Value has no unit. Allowed range is 0 to 15564
		    in micro units. If this is not specified, the default value
		    used will be 183.
		    used will be 184.

- qcom,ki-coeff-med-chg
	Usage:      optional
@@ -419,8 +419,8 @@ First Level Node - FG Gen4 device
		    coefficient will be applied: qcom,ki-coeff-low-chg if the
		    threshold is not breached, and qcom,ki-coeff-med-chg
		    otherwise. Allowed range is 0 to 3984 milliamperes. If this
		    is not specified, the default value used will be 1000
		    (1000 mA).
		    is not specified, the default value used will be 500
		    (500 mA).

- qcom,ki-coeff-chg-med-hi-thresh-ma
	Usage:      optional
@@ -429,8 +429,8 @@ First Level Node - FG Gen4 device
		    coefficient will be applied: qcom,ki-coeff-med-chg if the
		    threshold is not breached, and qcom,ki-coeff-hi-chg
		    otherwise. Allowed range is 0 to 3984 milliamperes. If this
		    is not specified, the default value used will be 1500
		    (1500 mA).
		    is not specified, the default value used will be 1000
		    (1000 mA).

- qcom,ki-coeff-cutoff
	Usage:      optional
+4 −4
Original line number Diff line number Diff line
@@ -1511,7 +1511,7 @@ static int fg_gen4_set_ki_coeff_dischg(struct fg_dev *fg, int ki_coeff_low,
	return 0;
}

#define KI_COEFF_LOW_DISCHG_DEFAULT	122
#define KI_COEFF_LOW_DISCHG_DEFAULT	367
#define KI_COEFF_MED_DISCHG_DEFAULT	62
#define KI_COEFF_HI_DISCHG_DEFAULT	0
static int fg_gen4_adjust_ki_coeff_dischg(struct fg_dev *fg)
@@ -5298,7 +5298,7 @@ static int fg_parse_ki_coefficients(struct fg_dev *fg)
		}
	}

	chip->dt.ki_coeff_low_chg = 183;
	chip->dt.ki_coeff_low_chg = 184;
	of_property_read_u32(node, "qcom,ki-coeff-low-chg",
		&chip->dt.ki_coeff_low_chg);

@@ -5310,11 +5310,11 @@ static int fg_parse_ki_coefficients(struct fg_dev *fg)
	of_property_read_u32(node, "qcom,ki-coeff-hi-chg",
		&chip->dt.ki_coeff_hi_chg);

	chip->dt.ki_coeff_lo_med_chg_thr_ma = 1000;
	chip->dt.ki_coeff_lo_med_chg_thr_ma = 500;
	of_property_read_u32(node, "qcom,ki-coeff-chg-low-med-thresh-ma",
		&chip->dt.ki_coeff_lo_med_chg_thr_ma);

	chip->dt.ki_coeff_med_hi_chg_thr_ma = 1500;
	chip->dt.ki_coeff_med_hi_chg_thr_ma = 1000;
	of_property_read_u32(node, "qcom,ki-coeff-chg-med-hi-thresh-ma",
		&chip->dt.ki_coeff_med_hi_chg_thr_ma);