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

When VIN/2 – VOUT < the threshold with debounce time,
WIN_UV protection kicks in. Update this threshold to
10mV.

Change-Id: I015528b9fb1e4db86c4e1af186aa0f6a912967f2
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
This commit is contained in:
Ashish Chavan 2020-07-17 14:11:37 +05:30 • committed by Gerrit - the friendly Code Review server
commit 7b32e9aedf

View file

@ -1945,6 +1945,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);
@ -2270,6 +2278,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.