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

Commit 98ecaddf authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: phy: msm: Update voltage_max and current_max properties"

parents f86f3ce6 4caa90ef
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -77,6 +77,14 @@
#define PM_QOS_SAMPLE_SEC	2
#define PM_QOS_THRESHOLD	400

#define MICRO_5V 5000000
#define MICRO_9V 9000000

#define SDP_CURRENT_UA 500000
#define CDP_CURRENT_UA 1500000
#define DCP_CURRENT_UA 1500000
#define HVDCP_CURRENT_UA 3000000

enum msm_otg_phy_reg_mode {
	USB_PHY_REG_OFF,
	USB_PHY_REG_ON,
@@ -3611,16 +3619,24 @@ static int otg_power_set_property_usb(struct power_supply *psy,
		switch (psy->type) {
		case POWER_SUPPLY_TYPE_USB:
			motg->chg_type = USB_SDP_CHARGER;
			motg->voltage_max = MICRO_5V;
			motg->current_max = SDP_CURRENT_UA;
			break;
		case POWER_SUPPLY_TYPE_USB_DCP:
			motg->chg_type = USB_DCP_CHARGER;
			motg->voltage_max = MICRO_5V;
			motg->current_max = DCP_CURRENT_UA;
			break;
		case POWER_SUPPLY_TYPE_USB_HVDCP:
			motg->chg_type = USB_DCP_CHARGER;
			motg->voltage_max = MICRO_9V;
			motg->current_max = HVDCP_CURRENT_UA;
			msm_otg_notify_charger(motg, hvdcp_max_current);
			break;
		case POWER_SUPPLY_TYPE_USB_CDP:
			motg->chg_type = USB_CDP_CHARGER;
			motg->voltage_max = MICRO_5V;
			motg->current_max = CDP_CURRENT_UA;
			break;
		case POWER_SUPPLY_TYPE_USB_ACA:
			motg->chg_type = USB_PROPRIETARY_CHARGER;