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

Commit 40fd3aef authored by Harry Yang's avatar Harry Yang
Browse files

power: smb138x: Add REAL_TYPE psy property for usb power_supply



Add POWER_SUPPLY_PROP_REAL_TYPE property for usb_psy to present its real
charger type.

Change-Id: Ic440441c554971e976b1af0decee8228f9b43cb6
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent f7627505
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -215,6 +215,7 @@ static enum power_supply_property smb138x_usb_props[] = {
	POWER_SUPPLY_PROP_VOLTAGE_NOW,
	POWER_SUPPLY_PROP_CURRENT_MAX,
	POWER_SUPPLY_PROP_TYPE,
	POWER_SUPPLY_PROP_REAL_TYPE,
	POWER_SUPPLY_PROP_TYPEC_MODE,
	POWER_SUPPLY_PROP_TYPEC_POWER_ROLE,
	POWER_SUPPLY_PROP_TYPEC_CC_ORIENTATION,
@@ -251,6 +252,9 @@ static int smb138x_usb_get_prop(struct power_supply *psy,
	case POWER_SUPPLY_PROP_TYPE:
		val->intval = chg->usb_psy_desc.type;
		break;
	case POWER_SUPPLY_PROP_REAL_TYPE:
		val->intval = chg->real_charger_type;
		break;
	case POWER_SUPPLY_PROP_TYPEC_MODE:
		val->intval = chg->typec_mode;
		break;