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

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

Merge "power: smb5: Enable Rp based ICL for USB Type-C non-compliant cables"

parents f5476e6e 43796f75
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -201,6 +201,12 @@ Charger specific properties:
  Value type: bool
  Definition: Boolean flag which when present enables step-charging.

- qcom,typec-legacy-rp-icl
  Usage:       optional
  Value type:  bool
  Definition:  Boolean property to enable setting ICL based on Rp for
		Type-C non-compliant legacy cables.

- qcom,wd-bark-time-secs
  Usage:      optional
  Value type: <u32>
+3 −0
Original line number Diff line number Diff line
@@ -324,6 +324,9 @@ static int smb5_parse_dt(struct smb5 *chip)
	chg->step_chg_enabled = of_property_read_bool(node,
				"qcom,step-charging-enable");

	chg->typec_legacy_use_rp_icl = of_property_read_bool(node,
				"qcom,typec-legacy-rp-icl");

	chg->sw_jeita_enabled = of_property_read_bool(node,
				"qcom,sw-jeita-enable");

+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@
#define typec_rp_med_high(chg, typec_mode)			\
	((typec_mode == POWER_SUPPLY_TYPEC_SOURCE_MEDIUM	\
	|| typec_mode == POWER_SUPPLY_TYPEC_SOURCE_HIGH)	\
	&& !chg->typec_legacy)
	&& (!chg->typec_legacy || chg->typec_legacy_use_rp_icl))

static void update_sw_icl_max(struct smb_charger *chg, int pst);

@@ -3955,7 +3955,7 @@ int smblib_get_charge_current(struct smb_charger *chg,
		return 0;
	}

	if (non_compliant) {
	if (non_compliant && !chg->typec_legacy_use_rp_icl) {
		switch (apsd_result->bit) {
		case CDP_CHARGER_BIT:
			current_ua = CDP_CURRENT_UA;
+1 −0
Original line number Diff line number Diff line
@@ -420,6 +420,7 @@ struct smb_charger {
	int			fake_batt_status;
	bool			step_chg_enabled;
	bool			sw_jeita_enabled;
	bool			typec_legacy_use_rp_icl;
	bool			is_hdc;
	bool			chg_done;
	int			connector_type;