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

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

Merge "qpnp-smb2: provide means to suspend dcin"

parents d727a95d 633b5ff6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -795,6 +795,7 @@ static int smb2_init_usb_main_psy(struct smb2 *chip)
 *************************/

static enum power_supply_property smb2_dc_props[] = {
	POWER_SUPPLY_PROP_INPUT_SUSPEND,
	POWER_SUPPLY_PROP_PRESENT,
	POWER_SUPPLY_PROP_ONLINE,
	POWER_SUPPLY_PROP_CURRENT_MAX,
@@ -810,6 +811,9 @@ static int smb2_dc_get_prop(struct power_supply *psy,
	int rc = 0;

	switch (psp) {
	case POWER_SUPPLY_PROP_INPUT_SUSPEND:
		val->intval = get_effective_result(chg->dc_suspend_votable);
		break;
	case POWER_SUPPLY_PROP_PRESENT:
		rc = smblib_get_prop_dc_present(chg, val);
		break;
@@ -841,6 +845,10 @@ static int smb2_dc_set_prop(struct power_supply *psy,
	int rc = 0;

	switch (psp) {
	case POWER_SUPPLY_PROP_INPUT_SUSPEND:
		rc = vote(chg->dc_suspend_votable, WBC_VOTER,
				(bool)val->intval, 0);
		break;
	case POWER_SUPPLY_PROP_CURRENT_MAX:
		rc = smblib_set_prop_dc_current_max(chg, val);
		break;
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ enum print_reason {
#define OTG_DELAY_VOTER			"OTG_DELAY_VOTER"
#define USBIN_I_VOTER			"USBIN_I_VOTER"
#define WEAK_CHARGER_VOTER		"WEAK_CHARGER_VOTER"
#define WBC_VOTER			"WBC_VOTER"

#define VCONN_MAX_ATTEMPTS	3
#define OTG_MAX_ATTEMPTS	3