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

Commit 2c110e4d authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: qpnp-smb5: Add DT option to enable JEITA-ARB handling



Add a DT option "qcom,jeita-arb-enable" to allow suspending
the input when VBAT > VJEITA to prevent ARB (reverse boost).

Change-Id: I5bf91367b633abf79cbc60ef5bdf93cca9559023
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent 04d121cf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -463,6 +463,9 @@ static int smb5_parse_dt_misc(struct smb5 *chip, struct device_node *node)
	chg->sw_jeita_enabled = of_property_read_bool(node,
				"qcom,sw-jeita-enable");

	chg->jeita_arb_enable = of_property_read_bool(node,
				"qcom,jeita-arb-enable");

	chg->pd_not_supported = chg->pd_not_supported ||
			of_property_read_bool(node, "qcom,usb-pd-disable");

+1 −1
Original line number Diff line number Diff line
@@ -8163,7 +8163,7 @@ int smblib_init(struct smb_charger *chg)
		}

		rc = qcom_step_chg_init(chg->dev, chg->step_chg_enabled,
						chg->sw_jeita_enabled, false);
				chg->sw_jeita_enabled, chg->jeita_arb_enable);
		if (rc < 0) {
			smblib_err(chg, "Couldn't init qcom_step_chg_init rc=%d\n",
				rc);
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 */

#ifndef __SMB5_CHARGER_H
@@ -510,6 +510,7 @@ struct smb_charger {
	int			fake_batt_status;
	bool			step_chg_enabled;
	bool			sw_jeita_enabled;
	bool			jeita_arb_enable;
	bool			typec_legacy_use_rp_icl;
	bool			is_hdc;
	bool			chg_done;