summaryrefslogtreecommitdiff
path: root/driver/charger/sm5803.c
diff options
context:
space:
mode:
authorFiras Sammoura <fsammoura@google.com>2022-06-17 16:41:11 +0000
committerFiras Sammoura <fsammoura@google.com>2022-06-17 16:41:11 +0000
commit6c1587ca70f558b4f96b3f0b18ad8b027d3ba99d (patch)
tree9a15b4a98d7987870a1805a33883d0cf9123fc05 /driver/charger/sm5803.c
parent63a8a1366e390b757c37e167927102be0fc4fb63 (diff)
parenta46d3f3feaac0d69012f61b66f652bff991d05a7 (diff)
downloadchrome-ec-6c1587ca70f558b4f96b3f0b18ad8b027d3ba99d.tar.gz
Merge remote-tracking branch cros/main into firmware-fpmcu-dartmonkey-release
Generated by: ./util/update_release_branch.py --board dartmonkey --relevant_paths_file ./util/fingerprint-relevant-paths.txt firmware-fpmcu-dartmonkey-release Relevant changes: git log --oneline 63a8a1366e..a46d3f3fea -- board/nocturne_fp board/dartmonkey common/fpsensor docs/fingerprint driver/fingerprint util/getversion.sh 981fb88cf8 docs/fingerprint: Resolve contradictory FPMCU factory flashing instructions 60032a8828 docs/fingerprint: Clean up formatting in fingerprint-factory-quick-guide.md f49eb6f894 docs/fingerprint: Run mdformat 64aa5fc7bb docs/fingerprint: Add links to info on fuzz testing 8bd99cc434 fpsensor: Use correct return type 2b2d7a991d fpsensor: Use correct return type BRANCH=None BUG=b:234772776 b:234181908 TEST=`make -j buildall` Cq-Include-Trybots: chromeos/cq:cq-orchestrator Signed-off-by: Firas Sammoura <fsammoura@google.com> Change-Id: I1714a77d292aad81bdc71982c88b2b067cfdada7
Diffstat (limited to 'driver/charger/sm5803.c')
-rw-r--r--driver/charger/sm5803.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c
index f3ea29c9f5..131c611842 100644
--- a/driver/charger/sm5803.c
+++ b/driver/charger/sm5803.c
@@ -282,8 +282,6 @@ enum ec_error_list sm5803_set_vbus_disch(int chgnum, int enable)
return rv;
}
-static int validate_sink_safety(int chgnum);
-
enum ec_error_list sm5803_vbus_sink_enable(int chgnum, int enable)
{
enum ec_error_list rv;
@@ -294,16 +292,6 @@ enum ec_error_list sm5803_vbus_sink_enable(int chgnum, int enable)
return rv;
if (enable) {
- /*
- * Incorrect value for some registers can cause hardware
- * damage; verify current configuration is safe before
- * enabling sinking to prevent damage and allow debugging.
- *
- * TODO(b:230712704) remove this check when cause of
- * incorrect behavior is understood.
- */
- rv |= validate_sink_safety(chgnum);
-
if (chgnum == CHARGER_PRIMARY) {
/* Magic for new silicon */
if (dev_id >= 3) {
@@ -1915,25 +1903,6 @@ static void command_sm5803_dump(int chgnum)
}
#endif /* CONFIG_CMD_CHARGER_DUMP */
-static int validate_sink_safety(int chgnum)
-{
- int regval = 0;
- int out = chg_read8(chgnum, 0x5C, &regval);
-
- if (regval != 0x7A) {
- CPRINTS("Register 0x5C had unexpected value 0x%02X"
- " when enabling sinking", regval);
-#ifdef CONFIG_CMD_CHARGER_DUMP
- CPRINTS("Dumping all registers:");
- command_sm5803_dump(chgnum);
-#endif
- CPRINTS("Updating register 5C to expected 0x7A"
- " and continuing..");
- out |= chg_write8(chgnum, 0x5C, 0x7A);
- }
- return out;
-}
-
const struct charger_drv sm5803_drv = {
.init = &sm5803_init,
.post_init = &sm5803_post_init,