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

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

Merge "wcnss: Configure VDD_PA voltage based on vadc feature"

parents 7145c809 3314476b
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -430,10 +430,13 @@ static void wcnss_vregs_off(struct vregs_info regulators[], uint size,

		/* Set voltage to lowest level */
		if (regulators[i].state & VREG_SET_VOLTAGE_MASK) {
			if (cfg->is_pronto_vadc) {
				if (cfg->vbatt < WCNSS_VBATT_THRESHOLD &&
				    !memcmp(regulators[i].name,
				    VDD_PA, sizeof(VDD_PA))) {
				voltage_level[i].max_voltage = WCNSS_VBATT_LOW;
					voltage_level[i].max_voltage =
						WCNSS_VBATT_LOW;
				}
			}

			rc = regulator_set_voltage(regulators[i].regulator,
@@ -492,12 +495,15 @@ static int wcnss_vregs_on(struct device *dev,
		/* Set voltage to nominal. Exclude swtiches e.g. LVS */
		if ((voltage_level[i].nominal_min ||
		     voltage_level[i].max_voltage) && (reg_cnt > 0)) {
			if (cfg->is_pronto_vadc) {
				if (cfg->vbatt < WCNSS_VBATT_THRESHOLD &&
				    !memcmp(regulators[i].name,
				    VDD_PA, sizeof(VDD_PA))) {
					voltage_level[i].nominal_min =
						WCNSS_VBATT_INITIAL;
				voltage_level[i].max_voltage = WCNSS_VBATT_LOW;
					voltage_level[i].max_voltage =
						WCNSS_VBATT_LOW;
				}
			}

			rc = regulator_set_voltage(regulators[i].regulator,