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

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

Merge "power: qpnp-smb5: add property to show fake charging status"

parents eb45ec3a 89949eb5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -535,6 +535,9 @@ static int smb5_parse_dt_misc(struct smb5 *chip, struct device_node *node)
	chg->suspend_input_on_debug_batt = of_property_read_bool(node,
					"qcom,suspend-input-on-debug-batt");

	chg->fake_chg_status_on_debug_batt = of_property_read_bool(node,
					"qcom,fake-chg-status-on-debug-batt");

	rc = of_property_read_u32(node, "qcom,otg-deglitch-time-ms",
					&chg->otg_delay_ms);
	if (rc < 0)
+10 −8
Original line number Diff line number Diff line
@@ -1910,6 +1910,7 @@ int smblib_get_prop_batt_status(struct smb_charger *chg,
	u8 stat;
	int rc, suspend = 0;

	if (chg->fake_chg_status_on_debug_batt) {
		rc = smblib_get_prop_from_bms(chg,
				POWER_SUPPLY_PROP_DEBUG_BATTERY, &pval);
		if (rc < 0) {
@@ -1919,6 +1920,7 @@ int smblib_get_prop_batt_status(struct smb_charger *chg,
			val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
			return 0;
		}
	}

	if (chg->dbc_usbov) {
		rc = smblib_get_prop_usb_present(chg, &pval);
+1 −0
Original line number Diff line number Diff line
@@ -496,6 +496,7 @@ struct smb_charger {
	int			connector_type;
	bool			otg_en;
	bool			suspend_input_on_debug_batt;
	bool			fake_chg_status_on_debug_batt;
	int			default_icl_ua;
	int			otg_cl_ua;
	bool			uusb_apsd_rerun_done;