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

Commit bf25d39d authored by Fenglin Wu's avatar Fenglin Wu Committed by Abhijeet Dharmapurikar
Browse files

power: qpnp-smb2: Unset ONLINE for UNKNOWN USB charger type



Currently, USB power_supply POWER_SUPPLY_PROP_ONLINE property will be
set if the charger type is POWER_SUPPLY_TYPE_UNKNOWN which is not
expected. Unset ONLINE for UNKNOWN USB charger type.

CRs-Fixed: 2065139
Change-Id: Ibc40ee62b2d95c319a7fe34b17813c2b57518f67
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent 2f3b0c11
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -465,6 +465,8 @@ static int smb2_usb_get_prop(struct power_supply *psy,
			val->intval = 0;
		else
			val->intval = 1;
		if (chg->real_charger_type == POWER_SUPPLY_TYPE_UNKNOWN)
			val->intval = 0;
		break;
	case POWER_SUPPLY_PROP_VOLTAGE_MIN:
		val->intval = chg->voltage_min_uv;