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

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

Merge "power: smb1390: Don't allow negative CP_ILIM override votes"

parents a9dd2ca0 2d8a2c6e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1150,11 +1150,14 @@ static int smb1390_validate_slave_chg_taper(struct smb1390 *chip, int fcc_uA)
		smb1390_dbg(chip, PR_INFO, "Set Master ILIM to MAX, post Slave disable in taper, fcc=%d\n",
									fcc_uA);
		vote_override(chip->ilim_votable, CC_MODE_VOTER,
						true, MAX_ILIM_DUAL_CP_UA);
				smb1390_is_adapter_cc_mode(chip),
				MAX_ILIM_DUAL_CP_UA);

		if (chip->usb_icl_votable)
			vote_override(chip->usb_icl_votable,
				      TAPER_MAIN_ICL_LIMIT_VOTER,
				      true, chip->cc_mode_taper_main_icl_ua);
				      smb1390_is_adapter_cc_mode(chip),
				      chip->cc_mode_taper_main_icl_ua);
	}

	return rc;
@@ -1378,7 +1381,7 @@ static int smb1390_set_prop(struct power_supply *psy,
	case POWER_SUPPLY_PROP_CP_ILIM:
		if (chip->ilim_votable)
			vote_override(chip->ilim_votable, CC_MODE_VOTER,
							true, val->intval);
					(val->intval > 0), val->intval);
		break;
	default:
		smb1390_dbg(chip, PR_MISC, "charge pump power supply set prop %d not supported\n",
+2 −2
Original line number Diff line number Diff line
@@ -6212,11 +6212,11 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
		if (chg->sec_cp_present) {
			/*
			 * If CP output topology is VBATT, limit main charger's
			 * FCC share to 1 A and let the CPs handle the rest.
			 * FCC share and let the CPs handle the rest.
			 */
			if (is_cp_topo_vbatt(chg))
				vote(chg->fcc_main_votable,
					WLS_PL_CHARGING_VOTER, true, 1000000);
					WLS_PL_CHARGING_VOTER, true, 800000);

			pval.intval = wireless_vout;
			rc = smblib_set_prop_voltage_wls_output(chg, &pval);