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

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

Merge "qpnp-smb2: Add DT option for enabling input suspend on fake battery"

parents c9051638 97b2a779
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ Charger specific properties:
  Definition: Boolean flag which indicates that the platform only support
		micro usb port.

- qcom,suspend-input-on-debug-batt
  Usage:      optional
  Value type: <empty>
  Definition: Boolean flag which when present enables intput suspend for
		debug battery.

=============================================
Second Level Nodes - SMB2 Charger Peripherals
=============================================
+2 −0
Original line number Diff line number Diff line
@@ -387,6 +387,8 @@ static int smb2_parse_dt(struct smb2 *chip)

	chg->dcp_icl_ua = chip->dt.usb_icl_ua;

	chg->suspend_input_on_debug_batt = of_property_read_bool(node,
					"qcom,suspend-input-on-debug-batt");
	return 0;
}

+3 −0
Original line number Diff line number Diff line
@@ -689,6 +689,9 @@ void smblib_suspend_on_debug_battery(struct smb_charger *chg)
	int rc;
	union power_supply_propval val;

	if (!chg->suspend_input_on_debug_batt)
		return;

	rc = power_supply_get_property(chg->bms_psy,
			POWER_SUPPLY_PROP_DEBUG_BATTERY, &val);
	if (rc < 0) {
+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ struct smb_charger {
	bool			micro_usb_mode;
	bool			otg_en;
	bool			vconn_en;
	bool			suspend_input_on_debug_batt;
	int			otg_attempts;
	int			vconn_attempts;
	int			default_icl_ua;