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

Commit 4c6b35ad authored by Kyle Tso's avatar Kyle Tso Committed by Mark Salyzyn
Browse files

ANDROID: GKI: power_supply: Define Debug Accessory Mode



PM8150B is able to detect Debug Accessory Modes and Non-Compliant cables
with CC pulled-up with the same Rp values. Define them in power_supply
framework for other drivers who need this information.

Bug: 139264914
Change-Id: I43c3e3ed64c9de73c70dde4663c4e89d9d241996
Signed-off-by: default avatarKyle Tso <kyletso@google.com>
(cherry picked from commit 22dc877f78abd2f375e3d93003b966014b8f05b8)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 150789066
parent f022b125
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -88,7 +88,13 @@ static const char * const power_supply_usbc_text[] = {
	"Source attached (default current)",
	"Source attached (medium current)",
	"Source attached (high current)",
	"Debug Accessory Mode (default current)",
	"Debug Accessory Mode (medium current)",
	"Debug Accessory Mode (high current)",
	"Non compliant",
	"Non compliant (Rp-Default/Rp-Default)",
	"Non compliant (Rp-1.5A/Rp-1.5A)",
	"Non compliant (Rp-3A/Rp-3A)"
};

static const char * const power_supply_usbc_pr_text[] = {
+8 −0
Original line number Diff line number Diff line
@@ -450,7 +450,15 @@ enum power_supply_typec_mode {
	POWER_SUPPLY_TYPEC_SOURCE_DEFAULT,	/* Rp default */
	POWER_SUPPLY_TYPEC_SOURCE_MEDIUM,	/* Rp 1.5A */
	POWER_SUPPLY_TYPEC_SOURCE_HIGH,		/* Rp 3A */
	POWER_SUPPLY_TYPEC_DAM_DEFAULT,		/* Rp-1.5A/Rp-3A */
	POWER_SUPPLY_TYPEC_DAM_MEDIUM,		/* Rp-Default/Rp-1.5A */
	POWER_SUPPLY_TYPEC_DAM_HIGH,		/* Rp-Default/Rp-3A */

	/* Non Compliant */
	POWER_SUPPLY_TYPEC_NON_COMPLIANT,
	POWER_SUPPLY_TYPEC_RP_STD_STD,		/* Rp-Default/Rp-Default */
	POWER_SUPPLY_TYPEC_RP_MED_MED,		/* Rp-1.5A/Rp-1.5A */
	POWER_SUPPLY_TYPEC_RP_HIGH_HIGH,	/* Rp-3A/Rp-3A */
};

enum power_supply_typec_src_rp {