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

Commit f327356f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5: Fix Type-C mode with non-compliant shorted cable"

parents 23e5d0be de6ff414
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2030,6 +2030,8 @@ static int smblib_get_prop_ufp_mode(struct smb_charger *chg)
		return POWER_SUPPLY_TYPEC_SOURCE_MEDIUM;
	case SNK_RP_3P0_BIT:
		return POWER_SUPPLY_TYPEC_SOURCE_HIGH;
	case SNK_RP_SHORT_BIT:
		return POWER_SUPPLY_TYPEC_NON_COMPLIANT;
	default:
		break;
	}
+2 −1
Original line number Diff line number Diff line
@@ -261,10 +261,11 @@ enum {
 *  TYPEC Peripheral Registers  *
 ********************************/
#define TYPE_C_SNK_STATUS_REG			(TYPEC_BASE + 0x06)
#define DETECTED_SRC_TYPE_MASK			GENMASK(3, 1)
#define DETECTED_SRC_TYPE_MASK			GENMASK(3, 0)
#define SNK_RP_STD_BIT				BIT(3)
#define SNK_RP_1P5_BIT				BIT(2)
#define SNK_RP_3P0_BIT				BIT(1)
#define SNK_RP_SHORT_BIT			BIT(0)

#define TYPE_C_SRC_STATUS_REG			(TYPEC_BASE + 0x08)
#define DETECTED_SNK_TYPE_MASK			GENMASK(4, 0)