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

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

Merge "power: smb1398: Update win-uv threshold to 10mV"

parents 69988585 b10ff91d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1946,6 +1946,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip)
		return rc;
	}

	/* Configure window (Vin/2 - Vout) UV level to 10mV */
	rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG,
			DIV2_WIN_UV_SEL_BIT, 0);
	if (rc < 0) {
		dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc);
		return rc;
	}

	/* Configure master TEMP pin to output Vtemp signal by default */
	rc = smb1398_masked_write(chip, SSUPLY_TEMP_CTRL_REG,
			SEL_OUT_TEMP_MAX_MASK, SEL_OUT_VTEMP);
@@ -2279,6 +2287,14 @@ static int smb1398_div2_cp_slave_probe(struct smb1398_chip *chip)
		return rc;
	}

	/* Configure window (Vin/2 - Vout) UV level to 10mV */
	rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG,
			DIV2_WIN_UV_SEL_BIT, 0);
	if (rc < 0) {
		dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc);
		return rc;
	}

	/*
	 * Disable slave WIN_UV detection, otherwise slave might not be
	 * enabled due to WIN_UV until master drawing very high current.