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

Commit c36bd9f6 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 b7488a6d 818c4e15
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1156,11 +1156,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;
@@ -1384,7 +1387,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",