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

Commit 92668207 authored by Shyam Kumar Thella's avatar Shyam Kumar Thella
Browse files

power: qpnp-smb5: fix POWER_SUPPLY_PROP_CHARGE_QNOVO_ENABLE property



Currently power supply property CHARGE_QNOVO_ENABLE always returns 0.
Fix this by properly reporting QNOVO status when power supply property
CHARGE_QNOVO_ENABLE is read.

Change-Id: Ia53f0448b8d9af97b8825a082b4fdc7067a75742
Signed-off-by: default avatarShyam Kumar Thella <sthella@codeaurora.org>
parent e9b4bea3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1754,6 +1754,14 @@ static int smb5_batt_get_prop(struct power_supply *psy,
		break;
	case POWER_SUPPLY_PROP_CHARGE_QNOVO_ENABLE:
		val->intval = 0;
		if (!chg->qnovo_disable_votable)
			chg->qnovo_disable_votable =
				find_votable("QNOVO_DISABLE");

		if (chg->qnovo_disable_votable)
			val->intval =
				!get_effective_result(
					chg->qnovo_disable_votable);
		break;
	case POWER_SUPPLY_PROP_CHARGE_FULL:
		rc = smblib_get_prop_from_bms(chg,
+1 −0
Original line number Diff line number Diff line
@@ -435,6 +435,7 @@ struct smb_charger {
	struct votable		*limited_irq_disable_votable;
	struct votable		*hdc_irq_disable_votable;
	struct votable		*temp_change_irq_disable_votable;
	struct votable		*qnovo_disable_votable;

	/* work */
	struct work_struct	bms_update_work;